Facebook 评论有公开链接,例如https://www.facebook.com/tony.tedeschi.507/posts/10157915009858963
链接格式 /username/posts/postid
用于页面评论的 Facebook API 能够返回有关每个页面评论的 json 详细信息 https://developers.facebook.com/docs/graph-api/reference/page/ratings/
{
"created_time": "2021-03-09T14:04:38+0000",
"recommendation_type": "positive",
"review_text": "Great products, excellent service and good prices. Will continue to order their products.",
"reviewer": {
"name": "Tony",
"id": "3952523184822278"
}
},
然而,它们并不是从返回的数据构建链接的明显方式。
名称是显示名称,而不是用户名。也不清楚审阅者 ID 是什么,因为它似乎与用户 ID 或帖子 ID 不匹配。
“?fields=open_graph_story”的 API 有另一种模式
这给出了帖子 ID,但完全缺少审阅者姓名/详细信息,因此无济于事。没有明确的方法可以直接匹配 2,除非可能通过日期+消息。
{
"id": "10157915009858963",
"message": "Great products, excellent service and good prices. Will continue to order their products.",
"start_time": "2021-03-09T14:04:38+0000",
"type": "sellers.rates",
"data": {
"recommendation_type": "positive",
"review_text": "Great products, excellent service and good prices. Will continue to order their products.",
"is_hidden": false,
"language": "en",
"seller": {
"id": "2544487878926442",
"title": "Britishop",
"type": "seller",
"url": "https://www.facebook.com/2544487878926442"
},
"has_review_update": false
}
}
有没有办法从评论 API 提供的详细信息中获取直接评论 URL 所需的详细信息?