【问题标题】:How do I get the likes number from facebook for a given url?如何从 facebook 获取给定 url 的点赞数?
【发布时间】:2014-05-05 19:45:38
【问题描述】:

一个网址http://www.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html?hpt=hp_t1

我怎样才能从这个 url 获取 facebook like 号码或 twitter 帖子号码或 google+ 号码?

【问题讨论】:

  • 这个问题似乎离题了,因为它与计算机编程无关。
  • 也许你想看看这个:stackoverflow.com/questions/9728279/… ..即使它可能与你想要的不同,它可能会引导你到正确的方向..

标签: facebook button twitter google-plus facebook-like


【解决方案1】:

您可以通过 Graph API 使用以下 FQL:

select url, like_count from link_stat where url='http://edition.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html'

像这样:

https://graph.facebook.com/fql?q=select%20url%2C%20like_count%20from%20link_stat%20where%20url%3D%27http%3A%2F%2Fedition.cnn.com%2F2014%2F03%2F15%2Fworld%2Fasia%2Fmalaysia-airlines-passenger-vignettes%2Findex.html%27

给出结果

{
  "data": [
    {
      "url": "http://edition.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html", 
      "like_count": 28529
    }
  ]
}

【讨论】:

  • 非常感谢。它可以从facebook获得like_count。但是twitter和google+呢?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多