Facebook评论听众返回评论的框ID而不是评论的ID

时间:2012-04-29 22:13:50

标签: facebook facebook-graph-api facebook-javascript-sdk

我正在使用听众在Facebook社交评论插件中获取评论ID。

    // Additional initialization code here, this is where we listen to events
    FB.Event.subscribe('comment.create',
      function(response) {
        alert('You commented in URL: ' + response.href + 'CommentID: ' + response.commentID);
        // do an ajax call to server to store user,commentID,href info if you require
      }
    );
  };

我的问题是返回的ID是评论框ID,我想要评论的ID。我怎么得到它?

2 个答案:

答案 0 :(得分:0)

您获得的ID是评论框的对象ID

您可以使用fql查询其注释,例如:

SELECT text,post_fbid,username,fromid,time FROM comment WHERE object_id=10150692213226360

http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3Dselect%20text%2Cpost_fbid%2Cfromid%2Ctime%20from%20comment%20where%20object_id%3D10150692213226360

有关fql中可以浏览的注释表的更多信息: http://developers.facebook.com/docs/reference/fql/comment/

答案 1 :(得分:0)

有一个关于此的错误。

可以找到here

它似乎已被分配,因此您可以很快找到解决方案。