gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 03:27:56 24 4
gpt4 key购买 nike

发送请求时

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

我得到了答案

{
"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
}
}

但是如果是二级评论,不知道父级评论的ID,无法编程回答。

也许有一些参数可以指定,以及额外的数据注释?

我发现还有一个参数metadata = 1但是它显示了对象的附加信息计数器,并且也没有父ID

最佳答案

我刚遇到这个问题,看来你可以得到家长的意见。

请求

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

(the ACCESS_TOKEN was omitted)

回应

{
"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"
}
},

关于python - 如何获取父评论的ID(facebook Graph API)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32267588/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com