简体   繁体   English

如何获取用户评论的Facebook评论,点赞和分享计数?

[英]How to get facebook comments, likes, and share count for post which is shared by user?

I have used following url to get count; 我已经使用以下网址进行计数;

https://graph.facebook.com/fql?q=SELECT%20total_count,comment_count,like_count,share_count%20FROM%20link_stat%20WHERE%20url=%27http://buff.ly/1mtu81f%27 https://graph.facebook.com/fql?q=SELECT%20total_count,comment_count,like_count,share_count%20FROM%20link_stat%20WHERE%20url=%27http://buff.ly/1mtu81f%27

This gives me result like; 这给了我类似的结果;

{ {

"data": [
    {
        "total_count": 95,
        "comment_count": 6,
        "like_count": 24,
        "share_count": 65
    }
]

} }

This result is giving me global count but I need count for only url which is shared by me & present on my facebook dashboard. 此结果使我获得了全局计数,但是我只需要计数由我共享并显示在我的Facebook仪表板上的url。

To achieve this, you'll have to query the stream FQL table ( https://developers.facebook.com/docs/reference/fql/stream/ ). 为此,您必须查询流FQL表( https://developers.facebook.com/docs/reference/fql/stream/ )。 Therefore, you'll need a "read_stream" permission. 因此,您需要具有“ read_stream”权限。

Try this: 尝试这个:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM