问题
We want to use the Facebook like count for a like-based chart. It's quite easy to get the like count of a resource via Facebook's Graph API.
$ curl http://www.example.com/some/resource
{
"id": "123456789",
"name": "Resource Name",
"link": "http://www.example.com/some/resourceL",
"likes": 26
}
The problem I have is that the Like button shows a much bigger number of likes than what I get from the Graph API. The like button on our web site shows a number of 100+ "likes". This seems to be correct behavior:
What makes up the number shown on my Like button?
The number shown is the sum of:
The number of likes of this URL
The number of shares of this URL (this includes copy/pasting a link back to Facebook)
The number of likes and comments on stories on Facebook about this URL
The number of inbox messages containing this URL as an attachment.
http://developers.facebook.com/docs/reference/plugins/like/
We'd like to show only the real like count on the button. Nothing else. Showing another number on the button would confuse our users. Is there a way to achieve that?
回答1:
i dont think there is any neat way to do it now. But you can use old rest api's getstats method to get the statistics, do little parsing and show it. note that the example in the link does not work now, you need to provide an access_token which limits you to 600 requests per 600 seconds.
来源:https://stackoverflow.com/questions/6895150/facebook-like-button-shows-wrong-like-count