I am using facebook like in my site, and my php script need to know how many people like every page. For example I want to use in php echo $likes;
where $likes
is a number of likes. Is it possible to do?
views:
79answers:
1
A:
Using the new Graph API (http://developers.facebook.com/docs/reference/api/page) this is fairly straight forward.
Just do: https://graph.facebook.com/uniqueid/members
Using the new SDK library (http://github.com/facebook/php-sdk/) do the following:
$facebook = new Facebook($appId,$secret);
$facebook->api('uniqueid/members');
This should return a JSON array which you can iterate.
Peter Brooks
2010-04-26 17:58:16