• Anonymous User 13362967

    (@anonymized-13362967)


    function facebook_share_count($url) {
     	$json_url = 'https://graph.facebook.com/' . esc_url(get_permalink());
    	$json = file_get_contents($json_url);
    	$json_output = json_decode($json);
    
    	if(isset($json_output->shares)){
    		$shares = $json_output->shares;
    	}
    
    }

    But this doesn’t work.

    var_dump($json_output);

    get me this: object(stdClass)#2343 (1) { ["error"]=> object(stdClass)#2344 (4) { ["message"]=> string(38) "(#4) Application request limit reached" ["type"]=> string(14) "OAuthException" ["is_transient"]=> bool(true) ["code"]=> int(4) } }

    How can I display share count without any plugin?

  • The topic ‘Display Facebook share count’ is closed to new replies.