使用GRAPH API的POSTS的posts_id

时间:2011-10-04 03:39:55

标签: facebook facebook-graph-api

我使用Graph API在用户墙上发布帖子。

我怎样才能获得Post ID这些帖子我正在做的事情,以后我可以 读或写这些帖子的评论?

1 个答案:

答案 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”就是这样。