Why does TweetSharp always return only 100 followers?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:22:20

You need to go through the cursor:

var followers = service.ListFollowersOf(twitterUser.TwitterName, -1);
while (followers.NextCursor != null)
{
    followers =  service.ListFollowersOf(user_id, followers.NextCursor);
    foreach (var follower in followers)
    {
         twitterUser.Followers.Add(follower.ScreenName);
    }
}

You can see this in some of the tests: https://github.com/danielcrenna/tweetsharp/blob/master/src/net40/TweetSharp.Next.Tests/Service/TwitterServiceTests.cs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!