In an update to this post here is another way to obtain the number of likes for a Facebook page.
I’ll assume that you’ve already registered a Facebook application, have downloaded the PHP SDK and have included for use in your code.
require('facebook.php');
Setup an array with your Facebook applications credentials
$facebook = new Facebook(array(
'appId' => '000000000', // Put appID here
'secret' => '0000c000c000c000c', // Put your secret key here
));
Decide which page you wish to obtain the number of likes for
$getRequest = $facebook->api('/cocacola'); // Lets look at the Facebook page for the popular soft drink
echo $getRequests['likes'];
Obviously you can consume, contrast and display this information in more exciting ways than simply echoing it to the screen. Enjoy.
another and more easy way the facebook graph api.
http://newexception.com/facebook-like-counter
Definitely – if you’re not loading the full SDK and want a quick like count using the Graph API is a great way to go. Thanks for the link.
Pingback: Get Facebook Likes and Shares via Graph API – boolean.co.nz
Here is an app that automates the process for you and does not require any programming: https://apps.facebook.com/analytics-scholatec/