相关疑难解决方法(0)

让Facebook喜欢/分享给定URL的数量

我正在使用Facebook API获取给定URL的类似/共享计数.奇怪的是,返回结果似乎很不一致.例如,此页面返回结果:

https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http://www.groupon.com/deals/seattlehelitourscom-by-classic-helicopter-corp'&format=json

然而,这个不是:

https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http://www.livingsocial.com/deals/278194-sunset-kayaking-hot-chowder'&format=json

第二页显然有一个共享计数,当我检查页面的HTML时,用于共享的URL是我在上面的API请求中放置的URL.但是,API不响应任何数量的喜欢或分享的任何计数信息.

关于为什么API可能会响应某些URL而不是其他URL的任何线索?

facebook facebook-fql facebook-graph-api

56
推荐指数
6
解决办法
12万
查看次数

如何从文章中获取Facebook喜欢,分享,评论数量

我需要从文章中获取Facebook喜欢,分享,评论数量

有没有办法获取Facebook(喜欢,分享,评论)计数.

提前致谢.

php facebook

11
推荐指数
2
解决办法
3万
查看次数

过滤RSS源以仅显示更受欢迎的链接

我有一个RSS源,每天输出约100篇文章.我想过滤它只包括更流行的链接,也许过滤它到50或更少.回到当天,我相信你可以使用"postrank"来做到这一点,但现在在Google收购后已经不复存在.

任何人都知道如何过滤特定的RSS源以仅包含更受欢迎的输出?

谢谢!

yahoo rss pipe popularity filter

5
推荐指数
1
解决办法
268
查看次数

在PHP中获取给定URL的Google +共享

我想在PHP中获取google plus上的给定URL的份额数.我找到了这个功能:

function get_shares_google_plus($url) {
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, "https://clients6.google.com/rpc");
  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
  $curl_results = curl_exec ($curl);
  curl_close ($curl);
  $json = json_decode($curl_results, true);
  print_r($json);
  return intval( $json[0]['result']['metadata']['globalCounts']['count'] );
}
Run Code Online (Sandbox Code Playgroud)

但是,我总是得到同样的信息:Notice: Undefined index: result in ....

我做了print_r($json),我得到了:Array ( [0] => Array ( [error] => Array ( [code] => 400 [message] => Invalid Value [data] => Array ( [0] => Array ( …

php google-plus-one google-plus

4
推荐指数
1
解决办法
4605
查看次数