Privacy setting using Graph API
Posted
by
Anthony
on Stack Overflow
See other posts from Stack Overflow
or by Anthony
Published on 2011-02-06T15:22:56Z
Indexed on
2011/02/06
15:25 UTC
Read the original article
Hit count: 309
Hello, I'm currently trying to se privacy setting on post I do through Graph API, code is:
function graphStreamPublish(){
message1 = document.getElementById('message').value;
FB.api('/me/feed', 'post', { message: message1 }, privacy: {value: "CUSTOM", friends: "SOME_FRIENDS", network: "1", allow: "204506204", deny: "515592311",
function(response) {
if (response && response.post_id) {
alert('Post was not published.');
} else {
alert('Post was published.');
}
});
}
Then I just call this function for the things I right on textarea:
<center><textarea id="message" cols="50" rows="5">Test goes here!</textarea></center>
<br />
<center><a href="" onclick="graphStreamPublish(); return false;">Post message now!</a></center>
This does not work however woth the privacy part but works fine without. Am i doing something wrong?
Thanks.
© Stack Overflow or respective owner