
Untitled
By: a guest on
Jan 25th, 2012 | syntax:
PHP | size: 0.29 KB | hits: 643 | expires: Never
//Facebook Comment Count
function fb_comment_count($pURL) {
$filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $pURL);
$json = json_decode($filecontent);
$count = $json->$pURL->comments;
if ($count == 0 || !isset($count)) {
$count = 0;
}
echo $count;