This project has moved and is read-only. For the latest updates, please go here.

Error when geting a TwitterContext query

Oct 22, 2014 at 7:09 PM
Edited Oct 22, 2014 at 7:11 PM
Here is my code:

var usersResponse = (from user in twitterContext.User where user.Type == UserType.Lookup && user.UserID == id select user).ToList();

(where "twitterContext" is a TwitterContext object and "id" is a ulong parameter.)

This throws an exception: "Query must contain one of either ScreenName or UserID parameters, but not both."

As you can see from the part that I bolded, the code above does, in fact, contain UserID.

What's the problem here?
Oct 22, 2014 at 7:36 PM

The latest version of LINQ to Twitter, v3.0.5, has a UserIDList property that you can use. Here's the docs on that:

Querying User Details

Marked as answer by JoeMayo on 10/22/2014 at 12:06 PM
Oct 22, 2014 at 7:43 PM
Ah, got it, thanks!