posts_id of POSTS using GRAPH API
I am posting posts on Users wa开发者_高级运维ll using Graph API.
How can I get the Post ID
for these posts which I am doing so i can later
read or write comments on these posts?
FB.api('/me/feed', 'post', { link: body,picture:PICTURE,name:'NAME',description:'DESCRIPTION',caption:'CAPTION',message:'MESSAGE' }, function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id); //response.id is the post ID of the post published.
}
Sorry you are using graph api...My bad. When the post is published you get the id in the response. Check it. it should be in JSON fomat. "id:POST_ID" Something like that.
精彩评论