I have written a php to fetch followers of a given username of twitter by using twitter API.
But the result is limited by the number of followers.
For example, there are only 100 followers of BBCWorld listed in result, instead of 367,480.
What is the solution to overcome this limitation?
<?php
$username="BBCWorld"; //input user name of twitter
$follower_url = "http://api.twitter.com/1/statuses/followers/".$username.".xml";
$twFriends = curl_init();
curl_setopt($twFriends, CURLOPT_URL, $follower_url);
curl_setopt($twFriends, CURLOPT_RETURNTRANSFER, TRUE);
$twiFriends = curl_exec($twFriends);
$response = new SimpleXMLElement($twiFriends);
foreach($response->user as $friends){
$thumb = $friends->profile_image_url;
$url = $friends->screen_name;
$name = $friends->name;
?>
<a title="<?php echo $name;?>" href="http://www.twitter.com/<?php echo $url;?>"><img class="photo-img" src="<?php echo $thumb?>" border="0" alt="" width="40" /></a>
<?php
}
?>


Sign In
Create Account

Back to top









