如何检索 Facebook 帖子的评论和点赞数
我尝试执行以下 FQL,结果始终是空 XML
https:// api.facebook.com/method/fql.query?query=SELECT post_id, comments.count FROM Stream where post_id = 167995709886177
<fql_query_response list="true"/>
这是帖子,有很多评论和喜欢 http://www.facebook.com/ryanleslie/posts/167995709886177
请帮忙
I am trying to execute following FQL and the result is always an empty XML
https://api.facebook.com/method/fql.query?query=SELECT post_id, comments.count FROM stream where post_id = 167995709886177
<fql_query_response list="true"/>
This is the post and it has lot of comments and LIKEs
http://www.facebook.com/ryanleslie/posts/167995709886177
Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@Anz 只需浏览 Facebook 开发者部分即可。你所有的疑问都可以解决
@Anz just go through facebook developer section. all your doubt solve their
您需要使用如下网址:
https://graph.facebook.com/100002725117360_142921995808637< /strong>?access_token=154407880175|16a3d55d6e4be468d6a131bc.1-100002735407608|IhahmvIUsur7GuZ45rxRj3boXtE
粗体 id (100002725117360_142921995808637) 是帖子的 ID。下划线之前的部分是帖子出现在其墙上的人的用户 ID,之后的部分可能是您在示例中使用的 ID。
这将为您提供所需的一切——评论、点赞等。如果您想要更窄的信息,您可以使用如下 URL:
https://graph.facebook.com/100002725117360_142921995808637/likes?access_token=154407880175|16a3d55d6e4be468d6a131bc.1-100002735407608|IhahmvIUsur 7GuZ45rxRj3boXtE
注意:这是一个测试用户帐户,所以我我不会在这里暴露任何人的私人信息。
You need to use a URL like this:
https://graph.facebook.com/100002725117360_142921995808637?access_token=154407880175|16a3d55d6e4be468d6a131bc.1-100002735407608|IhahmvIUsur7GuZ45rxRj3boXtE
The bolded id (100002725117360_142921995808637) is the ID of the post. The part before the underscore is the user id of the person on whose wall the post appears, and the part after is probably the ID you are using in the example.
This will give you everything you need -- comments, likes, etc. If you want even narrower info, you can do that with URLs like this:
https://graph.facebook.com/100002725117360_142921995808637/likes?access_token=154407880175|16a3d55d6e4be468d6a131bc.1-100002735407608|IhahmvIUsur7GuZ45rxRj3boXtE
Note: this is a test user account, so I'm not exposing anyone's private info here.