Use the {pagepost-id}_{comment-id}
格式代替。
请求示例:-
curl -i -X GET \
"https://graph.facebook.com/v17.0/222277054012345_979370980112345?access_token=<YOUR_PAGE_ACCESS_TOKEN>"
回复:-
{
"created_time": "2023-06-25T06:25:41+0000",
"from": {
"name": "John doe",
"id": "111282025112345"
},
"message": "This is to explore FB comment API.",
"id": "222277054012345_979370980112345"
}
此外,要获取 Facebook 页面帖子上的所有评论,您可以使用以下 API 调用:-
要求:-
curl -i -X GET \
"https://graph.facebook.com/v17.0/111282025112345_222277054012345/comments?access_token=<YOUR_PAGE_ACCESS_TOKEN>"
在 URL 中,111282025112345 是page_id
222277054012345 是post_id
.
回复:-
{
"data": [
{
"created_time": "2023-06-25T06:25:41+0000",
"from": {
"name": "John doe",//Comment Author's name
"id": "111282025112345"//Comment Author's id
},
"message": "This is to explore FB comment API.",
"id": "222277054012345_979370980112345" //`{pagepost-id}_{comment-id}`
}
],
"paging": {
"cursors": {
"before": "MgZDZD",
"after": "MQZDZD"
}
}
}
希望这可以帮助。