API v1.1

Oct 2, 2012 at 8:53 AM

I'm currently using

            using (var twitterCtx = new TwitterContext(auth, "https://api.twitter.com/1/", "https://search.twitter.com/"))
            {

                    var tweetreponse = twitterCtx.UpdateStatus(strStatus);
                    return tweetreponse.ID.ToString();

            }

when posting a new tweet. What should the new URLs be for v1.1 of the API please?

Coordinator
Oct 2, 2012 at 11:12 AM

Hi,

Constructor overload with URLs isn't necessary, you can just use the ITwitterAuthorizer overload.  The overload you're using would be as follows:

            using (var twitterCtx = new TwitterContext(auth, "https://api.twitter.com/1.1/", "https://api.twitter.com/1.1/search/"))
            {

                    var tweetreponse = twitterCtx.UpdateStatus(strStatus);
                    return tweetreponse.ID.ToString();

            }

Joe

 

Oct 2, 2012 at 11:16 AM

Thanks, so I could just use

            var auth = new SingleUserAuthorizer
            {
                Credentials = new InMemoryCredentials
                {
                    ConsumerKey = "",
                    ConsumerSecret = "",
                    OAuthToken = "",
                    AccessToken = ""
                }
            };


            using (var twitterCtx = new TwitterContext(auth))

with the correct values in auth?

Coordinator
Oct 2, 2012 at 12:18 PM

Right, that would work fine.

Joe

Oct 3, 2012 at 8:22 AM

Great, thanks for your help.