function fb_fan_count($facebook_name)
{
$data = json_decode(file_get_contents(“https://graph.facebook.com/”.$facebook_name));
$likes = $data->likes;
return $likes;
}
Syntex:
<?php
$page = “w2class.com”;
$count = fb_fan_count($page);
echo $count;
?>