dg85
dg85

Reputation: 490

Getting an accurate Facebook like count

I'm attempting to determine the number of likes for a specific url however have found that Facebook is returning zero likes via the graph api, rest api and fql query despite showing 91 likes via its own button.

My question is how to access the data-source from which facebook like buttons derive their count?

Graph

Rest

FQL

Debugger throws no potential issues

All the above return zero likes, or simply don't return anything. Enter the url here however (and enable the button_count layout): and you'll see 91 likes on the button_count.

Is there anywhere I can access this data from Facebook?

I'd really rather not have to attempt scraping the value out of the like button's iframe!

Thanks.

Upvotes: 2

Views: 855

Answers (1)

Juicy Scripter
Juicy Scripter

Reputation: 25918

You retrieving number of likes for the wrong URL.

In OpenGraph tags for https://www.originalsourcevote.co.uk/orange_tracker.php og:url property points to Canonical URL https://www.originalsourcevote.co.uk/.

As you can see in the results from Graph API (next query will return correct number of shares/likes):

http://graph.facebook.com/?ids=https://www.originalsourcevote.co.uk/

FQL and Rest will both return correct results for Canonical URL.

Upvotes: 1

Related Questions