Advertisement
Guest User

Untitled

a guest
Jan 25th, 2012
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1.     //Facebook Comment Count
  2.     function fb_comment_count($pURL) {
  3.  
  4.     $filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $pURL);
  5.     $json = json_decode($filecontent);
  6.     $count = $json->$pURL->comments;
  7.     if ($count == 0 || !isset($count)) {
  8.             $count = 0;
  9.     }
  10.     echo $count;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement