Advertisement
Guest User

phpclass

a guest
Aug 24th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. public function getFacebookStats() {
  2.  
  3. $json = json_decode($this->getRemoteContents("http://graph.facebook.com/http://$this->url"), true);
  4.        
  5. return isset($json['share']['share_count'])?intval($json['share']['share_count']):0;
  6.    
  7. }
  8.    
  9. public function getFBcomments(){
  10.        
  11. $json = json_decode($this->getRemoteContents("http://graph.facebook.com/http://$this->url"), true);
  12.        
  13. return isset($json['share']['comment_count'])?intval($json['share']['comment_count']):0;   
  14.        
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement