簡體   English   中英

Twitter狀態更新失敗C#Twitterizer

[英]Twitter status update failed C# Twitterizer

Twitter狀態更新失敗,並顯示錯誤:“無法通過OAuth進行身份驗證。” 以下是我放入button1中的代碼。 如何解決此錯誤? 謝謝

        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);

該示例為我工作: http : //www.codeproject.com/Questions/176201/How-Do-I-MyStatus-Update-Twitter-Twitterizer2-C

也:

  • 我僅創建1個頁面名稱“ test.aspx”,這些頁面名稱在Twitter中進行更新
  • https://dev.twitter.com/apps/new中,我的Callbak網址為: http://172.0.0.1/auth/twitter/callback ://172.0.0.1/auth/twitter/callback
  • 要使用F5運行,其工作方式如下: http://localhost:53303/Test.aspx

而是您的應用程序被刪除或您在寫入令牌,秘密和密鑰等時出錯。 重新檢查這些並轉到您的應用程序設置,然后選擇“讀寫”並訪問直接消息。 在此處輸入圖片說明

祝一切順利...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM