Skip to content

Instantly share code, notes, and snippets.

@Phonbopit
Created June 20, 2013 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phonbopit/5821247 to your computer and use it in GitHub Desktop.
Save Phonbopit/5821247 to your computer and use it in GitHub Desktop.
<?php get_count_facebook(); ?>
https://graph.facebook.com/fanpage
https://graph.facebook.com/devsharing
<?php
function get_count_facebook() {
$facebook_name = 'DevSharing';
$fb_result = @json_decode(file_get_contents('https://graph.facebook.com/' . $facebook_name));
$fan_count = number_format($fb_result->likes);
echo $fan_count;
}
?>
{
"about": "DevSharing.com : more than just a simple page",
"category": "Community",
"description": "Computer IT News & Tips Programming \n\u0e23\u0e27\u0e21\u0e02\u0e48\u0e32\u0e27\u0e44\u0e2d\u0e17\u0e35 \u0e17\u0e34\u0e1b \u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e49 \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e34\u0e48\u0e07 ",
"is_published": true,
"talking_about_count": 3,
"username": "DevSharing",
"website": "http://www.DevSharing.com",
"were_here_count": 0,
"id": "445478558816822",
"name": "DevSharing.com",
"link": "http://www.facebook.com/DevSharing",
"likes": 49,
"cover": {
"cover_id": 476765945688083,
"source": "http://sphotos-d.ak.fbcdn.net/hphotos-ak-ash3/s720x720/576418_476765945688083_660646328_n.jpg",
"offset_y": 0,
"offset_x": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment