如何获取Facebook分享,像评论计数一个url与图api只(不被废弃的方式) [英] How to get facebook share, like, comment count for a url with graph api only (in a non-deprecated way)

查看:118
本文介绍了如何获取Facebook分享,像评论计数一个url与图api只(不被废弃的方式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是,在版本v2.1之后,api fql将被弃用。

The problem is that after v2.1 of graph api fql will be deprecated.

有人可以告诉我如何获取单独的喜好,共享计数给定的url使用只有图api?我正在寻找一些文件,但没有任何,我只能得到只有股份,这是喜欢+股份+评论。

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随着Graph API v2的推出,已经宣布不推荐像 http://api.facebook.com/restserver.php?method=links.getStats&urls )。 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是这样的:

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...).

我个人的意见是,您应该继续使用FQL调用 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.

这篇关于如何获取Facebook分享,像评论计数一个url与图api只(不被废弃的方式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆