larsen161
larsen161

Reputation: 497

Find Like Count for a URL | REST API and FQL returns wrong vales

I am trying to find the number of likes a particular URL has across Facebook. Normally this could be found by using the REST API or through a FQL query. Now, these figures seem to be reporting inaccurate figures. How can an accurate total for likes, comments and shares be found for a particular URL?

Reference Facebook Post (63 likes): http://www.facebook.com/permalink.php?story_fbid=340865255940883&id=372915765358

Facebook Graph API (62 Likes): https://graph.facebook.com/340865255940883/likes?limit=1000

Facebook REST API (7 likes): http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.5x5m.com/facebook/14052/1334966/26367/psyk_forandring_TV3.html

Facebook FQL API (7 likes): 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%22http://www.5x5m.com/facebook/14052/1334966/26367/psyk_forandring_TV3.html%22&access_token=AAAAAAITEghMBAPcyTHSBWwZC9XIM1MhnHHjE3FXh9q2omSLj9DdKGpdUOL1vs0r5MWazG85hgU4xi9AE1ziYRAejuaCExlOTqLpp1VQZDZD

Upvotes: 3

Views: 1963

Answers (1)

Surabhil Sergy
Surabhil Sergy

Reputation: 2006

Please Note:Facebook is deprecating the REST API https://developers.facebook.com/blog/post/616/ It would be better to choose Graph API/FQL methods.

It would be better to use FQL method,

https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url='http://www.google.com'

And this would return,

{
   "data": [
      {
         "url": "http://www.google.com",
         "normalized_url": "http://www.google.com/",
         "share_count": 4989540,
         "like_count": 1317162,
         "comment_count": 1684401,
         "total_count": 7991103,
         "commentsbox_count": 807,
         "comments_fbid": 396269740024,
         "click_count": 265614
      }
   ]
}

Upvotes: 2

Related Questions