开发者

How to get share, like, comment and total count from facebook.com/username

开发者 https://www.devze.com 2023-04-13 01:56 出处:网络
I would like to get share, like, comment and total count from a fan page facebook.com/username Actually if I have a www.example.com, I can have these counts using FQL:

I would like to get share, like, comment and total count from a fan page facebook.com/username

Actually if I have a www.example.com, I can have these counts using FQL:

  • SELECT total_count, like_count, comment_count, share_count, commentsbox_count, click_count FROM link_stat WHERE url = 'http://www.example.com/'

But if I have a facebook fan page like this:

https://www.facebook.com/HuffingtonPost

Actually I'm able only to have total count:

https://grap开发者_开发知识库h.facebook.com/https://www.facebook.com/HuffingtonPost

And like count:

https://graph.facebook.com/HuffingtonPost

How to get remaining comment_count, share_count, commentsbox_count and click_count fields? Or at least comment_count or share_count :)


Use: https://graph.facebook.com/?ids=HuffingtonPost

Then parse the results. The response is json and you can decode that to get the number of 'likes' for example.

That is similar to what you noted, I just wanted to add the "?ids=" as that is how I ran it.

For the other information this could work:

https://api.facebook.com/method/fql.query?query=SELECT+url%2C+normalized_url%2C+share_count%2C+like_count%2C+comment_count%2C+total_count%2C+commentsbox_count%2C+comments_fbid%2C+click_count+FROM+link_stat+WHERE+url%3D"http://www.facebook.com/HuffingtonPost"

Let me know if this resolves what you are after.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号