Display Facebook fans count in full text php code

Want to display how many Facebook fans do you have, in full text, on your blog? It’s very easy using the following snippet:



function fb_fan_count($facebook_name){
// Example: https://graph.facebook.com/digimantra
$data = json_decode(file_get_contents("https://graph.facebook.com/".$facebook_name));
echo $data->likes;
}

Popular posts from this blog

Bring more traffic to your web site

php download code

Text messaging with PHP using the TextMagic API