Get JSON response from facebook api restserver

Pvpede

New Member
I want to get the like_count of a page. I tried using PHP SDK, but I've given up on it because my site always stops loading after the line of code where the FQL query is executed, so I wanted to try to get the like count 'manually'.I tried using file_get_contents() on https://api.facebook.com/restserver.php?method=fql.query&query=QUERY&format=json, but it shows me nothing.Do you know how I can get the JSON string from the above URL on which I can use json_decode(), or even a better way to get the like count?Any help is appreciated.PS If it means anything, QUERY is SELECT like_count FROM link_stat WHERE url="page_url_here"
 
Back
Top