问题描述
问题是graph api fql v2.1以后会被弃用.
The problem is that after v2.1 of graph api fql will be deprecated.
有人可以告诉我如何仅使用图形 api 获得单独的喜欢,共享给定 url 的数量吗?我正在寻找一些文档,但没有任何文档,我只能获得总分享",即喜欢 + 分享 + 评论.
Can someone tell me how to get separate likes, share count for given url using only graph api? I was looking for some documentation, but there isn't any, i can get only total "shares" which is likes + shares + comments.
是的,我知道有不朽的 http://api.facebook.com/restserver.php?method=links.getStats&urls,但如果 facebook 最后把它关掉怎么办?
Yes i know there is immortal http://api.facebook.com/restserver.php?method=links.getStats&urls, but what if facebook shuts it down at last?
推荐答案
REST API(调用类似 http://api.facebook.com/restserver.php?method=links.getStats&urls
code>) 被宣布为随着 Graph API v2.1 的引入而被弃用:https://developers.facebook.com/docs/apps/changelog#v2_1_deprecations 但也已经在 2011 年了:https://developers.facebook.com/blog/post/616/
The REST API (with calls like http://api.facebook.com/restserver.php?method=links.getStats&urls
) was announced as deprecated with the introduction of the Graph API v2.1: https://developers.facebook.com/docs/apps/changelog#v2_1_deprecations but also already in 2011: https://developers.facebook.com/blog/post/616/
因此,根据我的理解,在 2016 年 8 月 7 日引入 v2.1 两年后,此功能将无法运行:
So, from my understanding, this will yield in the inoperability of this feature at two years after the introduction of v2.1 on 7th August 2016:
https://developers.facebook.com/docs/apps/versions#howlong
最接近使用 Graph API 的 FQL API 调用结果的旧"REST 的是这个 afaik:
The closest you can get to the "old" REST of FQL API call results with the Graph API is this afaik:
https://developers.facebook.com/docs/graph-api/reference/v2.3/url/
但它省略了 like_count
指标(不要问我为什么......).
but it omits the like_count
metric (don't ask me why...).
我个人的意见是,您应该继续使用对 link_stat
(https://developers.facebook.com/docs/reference/fql/link_stat/) 表,因为这将在近 2 年内可用.这仅在您拥有 v2.0 应用程序时才有可能.在此之前,Graph API 可能会有一些额外的端点.
My personal opinion is that you should continue to use the FQL calls to the link_stat
(https://developers.facebook.com/docs/reference/fql/link_stat/) table, because this will be available for nearly the next 2 years. This is only possible if you have a v2.0 app. Maybe there'll be some additional endpoints for the Graph API until then.
这篇关于如何仅使用图形 api 获取 facebook 共享,例如,评论计数(以未弃用的方式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!