我正在尝试使用图形API访问Facebook评论,如下所示:
{
"posts": {
"data": [
{
"id": "113424589086090_113712022390680",
"comments": {
"data": [
{
"created_time": "2016-06-21T10:44:33+0000",
"from": {
"name": "Suneel Kumar",
"id": "113424589086090"
},
"message": "nice photo4",
"id": "113712022390680_113712149057334"
},
{
"created_time": "2016-06-21T10:57:10+0000",
"from": {
"name": "Suneel Kumar",
"id": "113424589086090"
},
"message": "ok",
"id": "113712022390680_113724525722763"
},
{
"created_time": "2016-06-21T10:57:15+0000",
"from": {
"name": "Suneel Kumar",
"id": "113424589086090"
},
"message": "not bad",
"id": "113712022390680_113724615722754"
},
这是代码;
curl -i -X GET \
"https://graph.facebook.com/v2.6/me?fields=posts%7Bcomments%7D&access_token=XXX"
我如何得到评论和喜欢的赞
我看到这样的事情:
/ {object-id} / likes
什么是对象?在这里?
答案 0 :(得分:0)
object-id
是对象的ID,可以是用户,页面,帖子,评论等。
在这种情况下,要获得此帖子的评论,object-id
将是113424589086090_113712022390680
。