Thanks for the link. :)
I came up with the following solution.
I came up with the following solution.
var screenName = "ladygaga";
int maxObjectsToRetrieve = 1000000;
var followerQuery = String.Format("https://api.twitter.com/1.1/followers/ids.json?screen_name={0}&count=5000", screenName);
List<long> scrapedIds = new List<long>();
long cursor = -1;
do
{
var result = TwitterAccessor.ExecuteCursorGETQuery<IIdsCursorQueryResultDTO>(followerQuery, maxObjectsToRetrieve, cursor);
if (result != null)
{
var ids = result.SelectMany(x => x.Ids);
scrapedIds.AddRange(ids);
cursor = result.Select(x => x.NextCursor).LastOrDefault();
}
var timeToWait = RateLimit.GetCurrentCredentialsRateLimits().FollowersIdsLimit.ResetDateTime - DateTime.Now;
Debug.WriteLine("waiting for {0}...", timeToWait);
Thread.Sleep(timeToWait);
} while (scrapedIds.Count < maxObjectsToRetrieve && cursor != 0);
Console.WriteLine("{0} ids found.", scrapeIds.Count);
Lokesh