I am creating a website that lets user rate items by liking it, the like box has been implemented but I need to get the number of likes (as value, as int) for a specific URL because I will use the number in sorting the items based on their likes. It can be solved using Facebook's REST API but Facebook is on the process of deprecating the API. Your help would be very much appreciated
You can get the number of URL likes if you already added Open Graph Protocol tags, else you can get the number of shares and not likes This is an example : IMDB URL with a Facebook page : https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/ Code (markup): To add and read about Open Graph Protocol : http://developers.facebook.com/docs/opengraph/ Code (markup): Fetch the content of this URL to get your link likes : https://graph.facebook.com/?ids=http://yourlinkhere Code (markup): Under PHP use json_decode function to transform the result to PHP Array