如何获得适当的Facebook喜欢计算URL

时间:2013-06-15 21:42:45

标签: facebook-graph-api

我需要按照每个网址获得正确的点数,与“按钮”按钮中显示的计数相同,但我尝试的所有方式都会返回错误的计数,示例 - 在写作时some CNN article显示117个喜欢此代码:

<div class="fb-like" data-send="false" data-layout="box_count" 
  data-width="90" data-show-faces="false" data-action="recommend" 
  href="http://www.cnn.com/2013/06/14/world/europe/london-underground-lego/index.html">
</div>

无论如何,当通过FQL查询时,它会返回完全不同的结果(只有34个喜欢):

https://graph.facebook.com/fql?q=SELECT like_count FROM link_stat WHERE url='http://www.cnn.com/2013/06/14/world/europe/london-underground-lego/index.html'

(当然CNN样本只是一个样本 - 我现在无法发布我的真实案例,但结果相似 - 在两种情况下计数都不匹配:/)

问题:还有其他一些绝对可靠的方法可以通过任何Facebook API获取网址吗?

1 个答案:

答案 0 :(得分:6)

CNN文章中显示的数字,此刻为131,表示链接被分享,喜欢或评论的总次数。

因此,根据reference,使用以下FQL来获取该数字:

https://graph.facebook.com/fql?q=SELECT total_count FROM link_stat WHERE url='http://www.cnn.com/2013/06/14/world/europe/london-underground-lego/index.html'

相关问题