Privacy setting using Graph API
- by Anthony
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.