sorry i'm kinda noob on this. i have this to count how many likes on a site, https://api.facebook.com/method/fql.query?query=SELECT%20like_count%20FROM%20link_stat%20WHERE%20url=%22http://www.ngendl.com%22 Code (markup): it was displayed good using browser but how can i display the result using html on my site? any reply will very appreciate. thanks.
ok i'm not bumping my own thread. i've go thru on google and tried to use javascript sdk, FB.api( { method: 'fql.query', query: 'SELECT like_count FROM link_stat WHERE url="http://www.ngendl.com"' }, function(response) { document.write(response.like_count); } ); Code (markup): but still doesnt work.
use php sdk that will be more appropriate if you want to display in your browser...btw for that there were some direct codes from fb i guess
Yeah, the PHP SDK is good. Also, you might need to set the method to "facebook.fql_query". I spent weeks pulling my hair out trying to get it working. Only think I'm not happy with is the speed of the response. If you find a faster way to do it, would love to know. $facebook->api(array( 'method' => 'facebook.fql_query', 'query' => 'SELECT like_count FROM link_stat WHERE url IN ('.$URL.')' ));