Search code examples
facebook-graph-apifacebook-likefacebook-share

Getting an accurate count of Facebook Likes and Facebook Shares for a URL using Graph API


I am aware that there are many posts where this same question has been asked and solutions provided, however I found that the popular and the accepted answers don't seem to provide an accurate answer. This could very well be due to a Facebook Graph API bug, but since I am not really sure, hence the question.I have used the url below

https://graph.facebook.com/?fields=id,share,og_object{likes.limit(0).summary(true),comments.limit(0).summary(true)}&id=http://www.yoururl.com

And the result I get is as follows

{
   "id": "http://www.yoururl.com",
   "share": {
  "comment_count": 0,
  "share_count": 4068
 },
   "og_object": {
  "likes": {
     "data": [

     ],
     "summary": {
        "total_count": 0
     }
  },
  "comments": {
     "data": [

     ],
     "summary": {
        "order": "chronological",
        "total_count": 0
     }
  },
  "id": "1088138987923727"
   }
}

Which is inaccurate as the share_count is actually shares + comments + likes, in short engagement, is there a better way to achieve the same?.


Solution

  • After spending a long time researching this, I have come to conclusion that there is no better way to do this. Facebook counts all these as interactions.