CursorMovement is Null

Feb 14, 2014 at 3:19 PM
Edited Feb 14, 2014 at 3:20 PM
Hi, im trying to get all followers of a twitter account .
but followers.CursorMovement returns "null"
here is my code
 while (cursor!=0)
            {
               
                try
                {
                    var followers =
                    await
                    (from follower in twitterCtx.Friendship
                     where follower.Type == FriendshipType.FollowerIDs &&
                           follower.UserID == userID &&
                           follower.Cursor == cursor
                     select follower)
                    .SingleOrDefaultAsync();

                     if (followers != null &&
                      followers.IDInfo != null &&
                      followers.IDInfo.IDs != null)
                    {
                        cursor = followers.CursorMovement.Next;
                        FollowerIDs.AddRange(followers.IDInfo.IDs);
                    }
thank you.
Coordinator
Feb 17, 2014 at 4:11 PM
Hi,

The Linq2TwitterDemos_Console project in the downloadable source code has a FriendshipDemos.cs file that has a FriendsListAsync that pages through results. It isn't exactly what you are doing, but the technique should be the same:

https://linqtotwitter.codeplex.com/SourceControl/latest#Linq2TwitterDemos_Console/FriendshipDemos.cs

@JoeMayo
Feb 28, 2014 at 10:50 AM
Hi,

i have the same problem. I also have tried the demos.

Can you suggest any other possible solutions?

Thank you.