Php 如何获取用户共享的帖子的facebook评论、喜欢和共享计数?

Php 如何获取用户共享的帖子的facebook评论、喜欢和共享计数?,php,facebook,facebook-graph-api,facebook-like,facebook-comments,Php,Facebook,Facebook Graph Api,Facebook Like,Facebook Comments,我使用了下面的url来获取计数 这给了我这样的结果 { } 此结果为我提供了全局计数,但我只需要我共享的url的计数,并显示在我的facebook仪表板上。要实现此目的,您必须查询流FQL表()。因此,您需要“读取流”权限 试试这个: select post_id, like_info, comment_info, share_info from stream where source_id=me() and attachment.href = "http://buff.ly/1mtu81f"

我使用了下面的url来获取计数

这给了我这样的结果

{

}


此结果为我提供了全局计数,但我只需要我共享的url的计数,并显示在我的facebook仪表板上。

要实现此目的,您必须查询流FQL表()。因此,您需要“读取流”权限

试试这个:

select post_id, like_info, comment_info, share_info from stream where source_id=me() and attachment.href = "http://buff.ly/1mtu81f"

我试过这个问题,但得到的回答是:;{“error”:{“message”:“您的语句不可索引。WHERE子句必须包含一个可索引列。这些列在链接自的表中用*标记”,“type”:“NoIndexFunctionException”,“code”:604}}如果您使用确切的查询,应该不会有问题。只要再试一次就行了!字段“source_id”是可索引的,请参阅
select post_id, like_info, comment_info, share_info from stream where source_id=me() and attachment.href = "http://buff.ly/1mtu81f"