我使用Graph API在用户墙上发布帖子。
我怎样才能获得Post ID
这些帖子我正在做的事情,以后我可以
读或写这些帖子的评论?
答案 0 :(得分:0)
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.
}
抱歉,您使用的是图形API ...我的不好。 发布帖子后,您将在响应中获得ID。 核实。它应该在JSON fomat中。 “id:POST_ID”就是这样。