Twitter followers is not showing


#1

Total twitter followers counter isn’t showing properly on my website

I have using following code :

$twitter[‘page_url’] = ‘http://www.twitter.com’;
try {
$twitter[‘page_url’] .= ‘/’ . $twitter_id;
@$data = curl_subscribers_text_counter( ‘http://twitter.com/users/show.xml?screen_name=’ . $twitter_id );
@$xml = new SimpleXmlElement( $data, LIBXML_NOCDATA );
@$twitter[‘followers_count’] = ( string ) $xml->followers_count;
} catch (Exception $e) {
$twitter[‘followers_count’] = 0;
}
if( get_option( ‘followers_count’) < $twitter[‘followers_count’] )
update_option( ‘followers_count’ , $twitter[‘followers_count’] );

if( $twitter['followers_count'] == 0 && get_option( 'followers_count') )
	$twitter['followers_count'] = get_option( 'followers_count');
		
elseif( $twitter['followers_count'] == 0 && !get_option( 'followers_count') )
	$twitter['followers_count'] = 0;

return $twitter;

}


#2

You’re using a retired URL format. See this FAQ item for more info:
[faq:11716]