TwitterContext

Sep 19, 2013 at 11:15 PM
Hi All , i would like to know how to exactly use TwitterContext and what shoud i exactly put in it.


For example
            var twitterCtx = new TwitterContext(??????);

var users =
                (from user in twitterCtx.User
                 where user.Type == UserType.Lookup &&
                       user.ScreenName == "JoeMayo,LinqToTweeter"
                 select user)
                 .ToList();

            users.ForEach(user => Console.WriteLine("Name: " + user.Name));
What do i have to put in the ????


Thank you very much for your help !
Coordinator
Sep 20, 2013 at 10:33 PM
Hi,

There are a few constructor overloads, primarily to facilitate testing, but the one you'll be using takes a single parameter of type IAuthorizer. Essentially, you pick and authorizer, populate credentials, and pass the authorizer instance to the TwitterContext constructor. For more information, I've written documentation on How to use OAuth and there are Samples you can access from the Main page and demos in the downloadable source code.

@JoeMayo
Sep 22, 2013 at 7:11 PM
JoeMayo wrote:
Hi,

There are a few constructor overloads, primarily to facilitate testing, but the one you'll be using takes a single parameter of type IAuthorizer. Essentially, you pick and authorizer, populate credentials, and pass the authorizer instance to the TwitterContext constructor. For more information, I've written documentation on How to use OAuth and there are Samples you can access from the Main page and demos in the downloadable source code.

@JoeMayo
Thank You so Much !! LinqToTwitter is impressive congratulations for your work.