我正在尝试使用 facebook API 检索 facebook POST 信息(即:LIKE 计数)
曾经工作的 URL 采用以下格式:
https://graph.facebook.com/?ids=[AUTHOR_ID]_[POST_ID]
(作者和帖子ID故意省略)
现在它返回一个错误的数据馈送。用于检索 POST 信息的 URL 结构是否已更改?
我正在尝试使用 facebook API 检索 facebook POST 信息(即:LIKE 计数)
曾经工作的 URL 采用以下格式:
https://graph.facebook.com/?ids=[AUTHOR_ID]_[POST_ID]
(作者和帖子ID故意省略)
现在它返回一个错误的数据馈送。用于检索 POST 信息的 URL 结构是否已更改?
With October 2013 Breaking Changes, likes.count field is no longer available in the feed.
You need to make a call for each POST_ID with the summary field enabled.
https://graph.facebook.com/POST_ID/likes?summary=true&access_token=XXXXXXXXXXXX
There will be a "summary" element with a "total_count" field.
不,这仍然对我有用 - 刚刚用我的一篇文章进行了测试:
"id": "<SNIP>",
//removed most fields
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/X/posts/Y"
},
{
"name": "Like",
"link": "https://www.facebook.com/X/posts/Y"
}
],
"type": "photo",
"status_type": "added_photos",
"object_id": "SNIP",
"application": {
"name": "Facebook for Android",
"namespace": "fbandroid",
"id": "350685531728"
},
"created_time": "2012-10-12T06:52:10+0000",
"updated_time": "2012-10-12T07:48:34+0000",
"likes": {
"data": [
// four likers' details
],
"count": 28
},
//snip
检查您是否仍然获得用户的read_stream
许可,帖子尚未被删除等