Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to query for the number of shares of a Facebook event URL?

One of my Facebook apps allows users to share a URL to a Facebook event using the default Facebook sharer. I was under the impression that you can query for the number of times such a URL got shared on Facebook. However, when I query the Graph API for some very popular events on Facebook I get results that show me 0 shares, likes and comments.

E.g.

SELECT click_count, comment_count, comments_fbid, commentsbox_count, like_count, normalized_url, share_count, total_count, url
FROM link_stat
WHERE url = 'http://www.facebook.com/events/385623724876261'

Returns

{
  "data": [
    {
      "click_count": 0, 
      "comment_count": 0, 
      "comments_fbid": null, 
      "commentsbox_count": 0, 
      "like_count": 0, 
      "normalized_url": "http://www.facebook.com/events/385623724876261", 
      "share_count": 0, 
      "total_count": 0, 
      "url": "http://www.facebook.com/events/385623724876261"
    }
  ]
}

How can I query Facebook for the real number of times a URL to a Facebook event got shared?

Thanks.

like image 960
Marijn Huizendveld Avatar asked Nov 02 '22 17:11

Marijn Huizendveld


1 Answers

Well, I believe you can't get this until you are the owner of this post. If you were the one who created this post on facebook or one of the admins of the page which is linked to (http://www.facebook.com/events/385623724876261) event then you would get the shares count.

Try fetching the information from the admin's access token or the one who created this event. If that doesn't work out for then the last thing you can do is try fetching this piece of information from page access token (which belongs to a page). Let me know if you are still not able to get this piece of information even after trying with Post Owner's token, Admin's token and lastly Page Access token.

Cheers,

Reno Jones

like image 60
Reno Jones Avatar answered Nov 15 '22 11:11

Reno Jones