Skip to content

Instantly share code, notes, and snippets.

@ken-muturi
Created November 17, 2013 06:21
Show Gist options
  • Select an option

  • Save ken-muturi/7510028 to your computer and use it in GitHub Desktop.

Select an option

Save ken-muturi/7510028 to your computer and use it in GitHub Desktop.
Display Facebook fans count in full text
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment