0

Given a particular URL, how can I get the Facebook Share count for it?

sergserg
  • 21,716
  • 41
  • 129
  • 182

2 Answers2

1

There is one way to get the count, i know that platforms like sharedcount.com are using this:

https://api.facebook.com/method/links.getStats?urls={your-url}/&format=json

I highly suggest not using FQL anymore, it is deprecated and no longer available in v2.1+ of the Graph API: https://developers.facebook.com/docs/apps/changelog#v2_1_deprecations

Edit: This is deprecated, but there is another possibility: Get FB likes, shares and comments for a URL using PHP - with no limit

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130
0

The easiest way to do this is to fire off a request to the Graph API.

The following query will select:

  • like_count
  • total_count
  • share_count
  • click_count
  • comment_count

https://graph.facebook.com/fql?q=SELECT%20like_count,%20total_count,%20share_count,%20click_count,%20comment_count%20FROM%20link_stat%20WHERE%20url%20=%20%27http://imdb.com%27

{
  "data": [
    {
      "like_count": 62024,
      "total_count": 191031,
      "share_count": 93544,
      "click_count": 71308,
      "comment_count": 35463
    }
  ]
}

Just replace the google.com with whatever URL you want to get the information for.

sergserg
  • 21,716
  • 41
  • 129
  • 182