Facebook图形API:获取“子注释"在讨论的树上 [英] Facebook graph API: get the "subcomments" in a tree of a discussion
问题描述
我正在尝试使用图形API下载Facebook讨论.问题是:讨论位于页面中,并且采用树式方式,这意味着有两种类型的注释:第一个消息的主"注释和主注释本身的子注释". /p>
似乎图形结果仅显示主要"注释,而不显示子注释.这是它返回的注释的示例:
{
"id": "53526364352_1574091",
"can_remove": false,
"created_time": "2014-02-05T10:46:37+0000",
"from": {
"name": "Main commenter",
"id": "5345353"
},
"like_count": 163,
"message": "I am a main comment",
"user_likes": false
},
此主注释的子注释没有链接或任何链接(并且有很多).
有没有办法获得子注释?
如果10101140614002197_8831228
是根注释的ID,则可以通过请求COMMENT_ID/comments
来检查子注释/答复.
例如:
- 根注释: http://graph.facebook.com/10101140614002197_8831228
- 子评论: http://graph.facebook.com/10101140614002197_8831228/comments
- 此根注释没有子注释,因此
data
列表为空: https://graph.facebook .com/10101140614002197_8831286/评论
I am trying to download a Facebook discussion using the graph API. The problem is: the discussion is located in a page, and in a tree-style manner, meaning that there are two types of comments: "main" comments, to the first message, and "subcomments" to the main comments themselves.
It seems that the graph result only shows the "main" comments and doesn't show the subcomments. Here's an example of a comment it returns:
{
"id": "53526364352_1574091",
"can_remove": false,
"created_time": "2014-02-05T10:46:37+0000",
"from": {
"name": "Main commenter",
"id": "5345353"
},
"like_count": 163,
"message": "I am a main comment",
"user_likes": false
},
There is no link or whatever to the subcomments of this main comment (and there are many).
Is there a way to get the subcomments?
If 10101140614002197_8831228
is an ID of a root comment, then you can check for subcomments/replies by requesting COMMENT_ID/comments
.
For example:
- the root comment: http://graph.facebook.com/10101140614002197_8831228
- the subcomment: http://graph.facebook.com/10101140614002197_8831228/comments
- this root comment has no subcomments so the
data
list is empty: https://graph.facebook.com/10101140614002197_8831286/comments
这篇关于Facebook图形API:获取“子注释"在讨论的树上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!