Facebook Graph API-通过一个查询访问评论及其回复 [英] Facebook Graph API - access the comments and their replies with one query

查看:136
本文介绍了Facebook Graph API-通过一个查询访问评论及其回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下Facebook Graph API v2.6查询:

The following Facebook Graph API v2.6 query:

/{{POST_ID}}/?fields=comments.summary(true)&access_token={{ACCESS_TOKEN}}

将获得指定帖子的评论(及其ID).然后查询

will get the comments (with theirs IDs) for the specified Post. Then the query

/{{COMMENT_ID}}/?fields=comments.summary(true)&access_token={{ACCESS_TOKEN}}

将获得对指定评论的答复.

will get the replies for the specified Comment.

是否可以通过一个Graph API查询获取给定帖子的评论及其回复?

Is there a way to get both the comments and their replies for given Post with one Graph API query?

推荐答案

这将使您得到评论的评论回复.

This will get u the comment replies of comments.

/{{POST_ID}}/?fields=comments{comments}&access_token={{ACCESS_TOKEN}}

您可以通过将字段嵌套在这样的注释中来获取注释回复的任何子信息(来自,id):

You can get any sub info(from,id) of comment replies by just nesting fields inside comments like this:

/{{POST_ID}}/?fields=comments{comments,from,id}&access_token={{ACCESS_TOKEN}}

您始终可以在以下位置尝试任何类型的查询:

You can always try out any kind of query at :

https://developers.facebook.com/tools/explorer/

如果您对如何形成任何查询有疑问,此工具左侧有一个搜索过滤器,您可以在其中输入所需的字段,它将为您自动生成查询.

In case you have any doubt on how to form any query, this tool has a search filter on left in which you enter the fields you require and it will automatilcally generate the query for you.

这篇关于Facebook Graph API-通过一个查询访问评论及其回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆