As both Legacy REST API and Facebook Query Language (FQL) will no longer be available after 7th August我正在寻找基于以下替代方案的 API Graph v2.6:
- https://api.facebook.com/method/links.getStats?urls=http://www.imdb.com/title/tt2015381/&format=json
- https://graph.facebook.com/fql?q=SELECT url, normalized_url, share_count, like_count, comment_count, total_count,commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url='http://www.imdb.com/title/tt2015381/'
到目前为止,这是我的 v2.6 当前等效项:https://graph.facebook.com/v2.6/?id=YOUR_URL&fields=og_object{engagement},share{share_count}&access_token=YOUR_TOKEN
尽管如此og_object{engagement}
count
和share_count
似乎分别保持了一些总计数,而不是点赞和分享计数(请参阅:https://developers.facebook.com/docs/graph-api/reference/v2.6/url)。
请问有人知道如何使用 API Graph v2.6 获取给定 URL 的 Facebook 分享、点赞和评论计数吗?非常感谢!
最佳答案
最后我在 https://developers.facebook.com 上报告了一个错误以下是回复:
- 对于旧版 REST API 和 Facebook 查询语言 (FQL),它们将于 2016 年 8 月 7 日后正式停止工作。
- 其次,关于
count
和share_count
,Facebook 上共享链接的任何参与(包括点赞和评论)都被视为额外分享,因为点赞和评论的人对共享链接的评论也会为他们在自己的时间线上的行动生成一个故事。为了进一步说明这一点,我粘贴了当前 Facebook 工程师的一句话:
(...) if person A shares a link (for example, http://fb.me/), this generates a story on person A's timeline. If person B comments on this story, this in turn generates a story on person B's timeline. Querying
/?id=
via the Graph API would then return ashare_count
of 2.
希望对您有所帮助。
关于facebook - 使用 API Graph v2.6 获取给定 URL 的 Facebook 分享、点赞和评论计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37491742/