How to update facebook page likes when a new like is made by user?

101 views Asked by At

Ok so I have a website where people login through facebook and they give access to the their liked pages,which is stored in my websites database,but the problem is what if a new page is liked,i could make a query now and then to fetch the new likes if new pages is liked by using an extended token,but the query will be useless if no new like is made,Is there any way that the system only goes and fetches when there is a new like done by the user and the system inserts it or any way that the app that is actually in facebook sent request to my website that a new like is made by the user ?

1

There are 1 answers

6
andyrandy On BEST ANSWER

This should be possible with the Realtime API, it includes a "likes" object for User object subscription: https://developers.facebook.com/docs/graph-api/real-time-updates/v2.2

How it works: