Now Facebook users can calculate their Likes, Shares and Comments of a specific URL and Posts and also you can create your own Facebook Like Count Calculator for your Websites and Blogs by using PHP Script and its totally free. We have already shared before Facebook Auto Like Script through which users can get maximum Facebook Likes count by using PHP Script here.

So if you want to count how many Likes, Shares, and Comments you are getting on each post you just have to obtain the like count via Facebook’s old rest API. While there may be a graph API method of accomplishing this now, this script still works perfectly well. For the simple form that I created on the Facebook like count page, I simply received what the user submitted via $_POST and then outputted it via the Google Charts API. If you want your own script for calculating likes, shares, and comments, the PHP Code is below!

$source_url = "http://www.your-website-name.com";  //This could be anything URL source including stripslashes($_POST['url']) 
$url = "http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($source_url);
$xml = file_get_contents($url);
$xml = simplexml_load_string($xml);
$shares =  $xml->link_stat->share_count;
$likes =  $xml->link_stat->like_count;
$comments = $xml->link_stat->comment_count;
$total = $xml->link_stat->total_count;
$max = max($shares,$likes,$comments);
?>
Code credit goes to allfacebook.

Free Facebook Like Count Script - Facebook Like Count Calculator

Now Facebook users can calculate their Likes, Shares and Comments of a specific URL and Posts and also you can create your own Facebook Like Count Calculator for your Websites and Blogs by using PHP Script and its totally free. We have already shared before Facebook Auto Like Script through which users can get maximum Facebook Likes count by using PHP Script here.

So if you want to count how many Likes, Shares, and Comments you are getting on each post you just have to obtain the like count via Facebook’s old rest API. While there may be a graph API method of accomplishing this now, this script still works perfectly well. For the simple form that I created on the Facebook like count page, I simply received what the user submitted via $_POST and then outputted it via the Google Charts API. If you want your own script for calculating likes, shares, and comments, the PHP Code is below!

$source_url = "http://www.your-website-name.com";  //This could be anything URL source including stripslashes($_POST['url']) 
$url = "http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($source_url);
$xml = file_get_contents($url);
$xml = simplexml_load_string($xml);
$shares =  $xml->link_stat->share_count;
$likes =  $xml->link_stat->like_count;
$comments = $xml->link_stat->comment_count;
$total = $xml->link_stat->total_count;
$max = max($shares,$likes,$comments);
?>
Code credit goes to allfacebook.

No comments: