使用 Graph API 访问评论的所有回复
我在使用 Graph API 访问 Facebook 帖子的所有回复时遇到问题。 (回复是针对另一条评论而发表的帖子)。
例如,转到
https:// /graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
生成 JSON 形式的评论。虽然此 JSON 文档将评论数量限制为 25,但人们可以使用“分页”和“下一页”键简单地访问剩余的评论。
不过,每条评论的回复似乎仅限 10 条。以 中的 JSON 片段为例https://graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
{ “id”:“10150090402026572_14446101”,..., "message": "很高兴今天早上推出评论框!", "创建时间": "2011-03-01T17:06:45+0000", “评论”: { “数据”: [...] “计数”:74 },
"comments" : "data" 数组保存对评论的回复。下面的“count”变量表示有多少回复。
有什么办法可以访问评论的所有回复吗?
任何帮助将不胜感激。谢谢。
I'm having trouble accessing all replies from a Facebook post using the Graph API. (A reply is a post made in response to another comment).
For example, going to
https://graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
yields comments in JSON form. While this JSON document caps the number of commments at 25, one can simply access the remaining comments using the 'paging' and 'next' keys.
Replies, however, appear to be limited to 10 per comment. Take for instance this snippet of JSON from https://graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
{
"id": "10150090402026572_14446101", ... ,
"message": "Excited for the launch of Comments Box this morning!",
"created_time": "2011-03-01T17:06:45+0000",
"comments": {
"data": [...]
"count": 74
},
The "comments" : "data" array holds the replies to a comment. The "count" variable below that indicates how many replies there are.
Is there any way to access all replies on a comment?
Any help would be much appreciated. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您添加:
到网址末尾: https://graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
它将显示 100 条评论,只需将 100 更改为任何count是显示所有评论。
If you add:
to the end of the url: https://graph.facebook.com/comments/?ids=http://developers.facebook.com/blog/post/472
It will display 100 comments, just change the 100 to whatever the count is to display all comments.