Exception: Requires ScreenName or UserID

May 29, 2014 at 1:23 PM
Edited May 29, 2014 at 1:33 PM
I'm trying to retrieve a list of Friends using the following VB code - converted some the C# example:
friendship = Await (From [friend] In twitterCtx.Friendship Where _
                             [friend].Type = FriendshipType.FriendsList AndAlso _
                             [friend].ScreenName = "MyScreenName" AndAlso _
                             [friend].Cursor = cursor _
                             Select [friend]).SingleOrDefaultAsync()
The C# example works fine
friendship =
                    await
                    (from friend in twitterCtx.Friendship
                     where friend.Type == FriendshipType.FriendsList &&
                           friend.ScreenName == "MyScreenName" &&
                           friend.Cursor == cursor
                     select friend)
                    .SingleOrDefaultAsync();
but the VB throws an exception:

System.ArgumentNullException = {"Requires ScreenName or UserID.
Parameter name: ScreenNameOrUserID"}
Coordinator
Jun 5, 2014 at 5:20 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jun 5, 2014 at 5:24 AM
Hi,

I'm not sure what's happening here, but I copied this to a work item so I don't forget to look at it. VB is supported, so I'll definitely take a look at it, I just haven't had time to do any demos.

@JoeMayo