This code had been deprecated, follow this link for a more updated code.

Facebook had change their API flow to work with apps. Previous PHP code to acquire your Facebook page like count might not work anymore. The API needed access token or auth configuration of an apps for it to GET the like count of your Facebook page. Here’s a simple PHP snippet for you to get Facebook page like count without access token. Copy or add this to your custom functions.

function dez_get_the_fb_like( $fb_pagename = '' ) {
$fburl = ''. $fb_pagename;
$params = 'select like_count from link_stat where url = "'.$fburl.'"';
$component = urlencode( $params );
$urls = ''.$component;
$string = file_get_contents( $urls );
if( $string ) {
 $fbLIkeAndSahre = json_decode( $string );
 $getFbStatus = $fbLIkeAndSahre->data['0'];
 $likecount = $getFbStatus->like_count;
 return $likecount;
} else {
 return 'Data did not exist';

and use this any where in your templates or php application.

echo dez_get_the_fb_like( $fb_pagename = 'YOUR PAGE NAME NOT ID' );

Check this free WordPress plugin that have built-in social counter widgets.

Related Topics:

Best Method for Taking a Screenshot on Mac
How to Take a Screenshot on Your PC or Laptop
How to Use New Facebook API 2.7 for Fan Page and Post Share Count
How To Fix Chinese Language WordPress Excerpts Issue