This project has moved. For the latest updates, please go here.

Failed to validate oauth signature and token with XAuthAuthorizer

Feb 5, 2014 at 10:22 PM
Edited Feb 6, 2014 at 12:54 AM
I am trying authentication with XAuth. However I get "Failed to validate oauth signature and token - Please visit the LINQ to Twitter FAQ (at the HelpLink) for help on resolving this error." error message. I do not use XAuthAuthorizer previously. I read documentation and i try implement that example but it does not works correctly. I give my code block blow. I missing something?
(I use mvc and LinqToTwitterPlc 3.0)
public async Task<ActionResult> CompleteXAuth(string Name, string Password)
            var auth = new XAuthAuthorizer
               CredentialStore = new XAuthCredentials
                   ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"],
                   ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"],
                   UserName = Name,
                   Password = Password
            await auth.AuthorizeAsync();

            var ctx = new TwitterContext(auth);

            ulong userid = auth.CredentialStore.UserID;
            string screenname = auth.CredentialStore.ScreenName;

            var userResponse =
                (from tweet2 in ctx.User
                 where tweet2.Type == UserType.Show &&
                       tweet2.ScreenName == screenname
                 select tweet2)

            TwitterApp.Models.Account.addAccount(new TwitterApp.Models.Account
                Description = userResponse.Description,
                Location = userResponse.Location,
                Name = userResponse.Name,
                OAuthToken = auth.CredentialStore.OAuthToken,
                OAuthTokenSecret = auth.CredentialStore.OAuthTokenSecret,
                ProfileImageUrl = userResponse.ProfileImageUrl,
                ScreenName = userResponse.ScreenName,
                TwitterId = userid,
                Url = userResponse.Url,
                IsValid = true

            return RedirectToAction("Index", "Account");
Feb 6, 2014 at 2:16 AM

You must have permission from Twitter before you can use xAuth. I just updated the FAQ too.