简体   繁体   English

如何获取父评论的 ID(facebook Graph API)?

[英]How to get the ID of the parent comment (facebook Graph API)?

When sending a request发送请求时

https://graph.facebook.com/v2.1/123456898765432/comments?access_token=TOKEN&pretty=1&filter=stream&limit=1&summary=1 https://graph.facebook.com/v2.1/123456898765432/comments?access_token=TOKEN&pretty=1&filter=stream&limit=1&summary=1

I get an answer我得到答复

{
   "data": [
      {
         "created_time": "2015-06-17T10:32:04+0000",
         "from": {
            "name": "First Name",
            "id": "12345678987654"
         },
         "message": "Message",
         "can_remove": true,
         "like_count": 0,
         "user_likes": false,
         "id": "123456898765432_123456789765433"
      }
   ],
   "paging": {
      "cursors": {
         "before": "...",
         "after": "..."
      },
   },
   "summary": {
      "order": "chronological",
      "total_count": 2532
   }
}

But if the comment of the second level, I do not know the ID of the parent comment, and I can not answer it programmatically.但是如果是二级的评论,我不知道父评论的ID,也无法以编程方式回答。

Maybe there are some arguments that can be specified, and additional data comment?也许可以指定一些参数,以及附加数据注释?

I found that there is still an argument metadata = 1 But it shows additional information counter on the object, and there is also no parent ID我发现还有一个argument metadata = 1 但是它显示了对象上的附加信息计数器,并且也没有父ID

I just had this problem and it seems that you can get the parent comment.我刚刚遇到了这个问题,似乎您可以获得父级评论。

request要求

111791572258237_803009099803144?fields=comments.filter(stream).limit(50){message,id,from,parent} 111791572258237_803009099803144?fields=comments.filter(stream).limit(50){message,id,from,parent}

(the ACCESS_TOKEN was omitted) (省略了 ACCESS_TOKEN)

response回复

{
  "message": "Sim, está acontecendo com várias pessoas. A Valve vai arrumar logo, provavelmente",
  "id": "803009099803144_803075496463171",
  "from": {
    "name": "Jonathan Gouvea",
    "id": "1218897258138073"
  },
  "parent": {
    "created_time": "2016-01-28T19:58:39+0000",
    "from": {
      "name": "César Rodryguês",
      "id": "552640601571460"
    },
    "message": "Dota ta fechando o de vcs quando vai entra na partida ?",
    "id": "803009099803144_803068649797189"
  }
},

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM