Ashley Smith
Ashley Smith

Reputation: 41

Twitter status update failed C# Twitterizer

Twitter status update failed with Error: 'Could not authenticate with OAuth.' The following is the code I put in button1. How do I fix this error? Thanks

        OAuthTokens tokens = new OAuthTokens();
        tokens.AccessToken = "I put my accesstoken";
        tokens.AccessTokenSecret = "I put my tokensecret";
        tokens.ConsumerKey = "I put my consumer key";
        tokens.ConsumerSecret = "I put consumer secret";

        TwitterResponse<TwitterStatus> tweetResponse = TwitterStatus.Update(tokens, "sample tweet");
        if (tweetResponse.Result == RequestResult.Success)
            MessageBox.Show("Twitter status successfully posted");
        else
            label13.Text = string.Format("Twitter status update failed with Error: '{0}'",
                tweetResponse.ErrorMessage);

Upvotes: 0

Views: 1120

Answers (2)

Abdul Qayyum
Abdul Qayyum

Reputation: 1052

Eather your application is deleted or your made error to write token ,secret and keys ect. recheck these this and goto your application setting and select read write and access direct messages here it is enter image description here

ALL the Best...

Upvotes: 0

Hernaldo Gonzalez
Hernaldo Gonzalez

Reputation: 2056

This example work for me: http://www.codeproject.com/Questions/176201/How-Do-I-MyStatus-Update-Twitter-Twitterizer2-C

Also:

  • I create only 1 page names "test.aspx" that make an Update in Twitter
  • In https://dev.twitter.com/apps/new my Callbak url was: http://172.0.0.1/auth/twitter/callback
  • To run with F5 its work as: http://localhost:53303/Test.aspx

Upvotes: 1

Related Questions