In my app I want to show the Twitter followers list. I've tried accomplishing this using the following code:
NSString *urlstring = [NSString stringWithFormat:
@"https://api.twitter.com/1/followers.json?screen_name=%@", username];
NSURL *url = [[NSURL alloc]initWithString:urlstring];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request startSynchronous];
But I get only 20 followers returned (from an account that has 1045 followers). So I tried:
NSString *urlstring = [NSString stringWithFormat:
@"https://api.twitter.com/1/followers.json?cursor=-1&screen_name=%@&count=10000",
username];
NSURL *url = [[NSURL alloc]initWithString:urlstring];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request startSynchronous];
Now I am getting 200 followers, which is still not the correct total. Is there a restriction on the Twitter API which would prevent me from getting the total number of followers in one call? Or could this issue be due to something else? All suggestions on how to fix this problem are welcome.
Thanks in advance!!