facebook-graph-apifacebook-webhooks

Subscribe to facebook graph api webhook for website likes count change


I have a website with some posts that have facebook like buttons. I would like to be able to sort those posts based on fb like count. I can get number of likes for any post querying https://graph.facebook.com/?ids=ABSOLUTE_URL_TO_POST but I would like to be able to subscribe to Graph Api, so endpoint of my server can get notified whenever someones likes any of those posts. That way I could store number of likes in my DB and then be able to sort posts based on that.

However, I am not able to find any suitable event in FB Graph API that I could subscribe to.

Any ideas? Thanks!


Solution

  • As correctly pointed out by luschn, there is no webhook api for getting likes count. Also if you will try get this likes count by polling graph.facebook.com you will quickly hit limit of allowed requests by facebook.

    There is no way how to do this at the moment.