hun*_*eox 8 facebook facebook-graph-api
通过使用Graph API,我可以检索评论,喜欢内部和外部Facebook网址的数量.但我只能获得外部Facebook网址的股票数量
例如:
https://graph.facebook.com/?ids=http://www.youtube.com/watch?v=tu8BNocnVzc
但不是Facebook的一个:
http://graph.facebook.com/?ids=http://www.facebook.com/photo.php?fbid=364861533533284
如何获取Facebook对象的份额?
(我可以通过使用此URL获取喜欢和评论http://graph.facebook.com/364861533533284)
Jes*_*lle -1
您应该使用 FQL 并查询照片表https://developers.facebook.com/docs/reference/fql/photo或 link_stat 表https://developers.facebook.com/docs/reference/fql/link_stat ..
以下是如何使用 FQL 调用来获取结果:
<?php
$img_url='http://www.facebook.com/photo.php?fbid=364861533533284';
$query_url="https://api.facebook.com/method/fql.query?query=
select%20total_count,share_count,like_count,comment_count,
commentsbox_count%20from%20link_stat%20where%20
url='" . $directory_url . "'&format=json";
$response = file_get_contents($query_url);
$response_array = json_decode($response, true);
$params=$response_array[0];
$total_count=$params['total_count'];
$like_count=$params['like_count'];
$comment_count=$params['comment_count'];
$share_count=$params['share_count'];
?>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3035 次 |
| 最近记录: |