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?
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.
This is the only answer I've found for this problem thus far. Seems like the opengraph doesn't yet return 'shares' for an object, which conversely are added to the like button's total_count. I've been trying to use like buttons as a voting mechanism in different projects for a while now, and thought I'd finally cracked it with a combo of cron-jobed opengraph queries, and javascript callbacks on the like buttons themselves. It's sad to learn that I may have to go back to the old REST API to make this work... In my experience When FB 'deprecates' something, it's not long for this world.