2012-09-08 26 views
0

我正在使用Twitterizer,並試圖讓我的ASP.Net應用程序將上報的流量事件上傳到官方Twitter帳戶。使用Twitterizer創建推文引發WebException 401

我看過類似的問題,我嘗試了所有建議(指定回調URL,檢查粗心的錯誤並確保應用程序具有讀寫權限),但我仍然無法解決問題。我有一些下面的設置和代碼的截圖。回叫網址不存在,但由它組成。任何幫助將不勝感激。

enter image description here enter image description here

+0

也許您的網絡連接有問題?你可以通過http連接直接訪問Twitter嗎?我有同樣的問題,因爲我的公司有一個Twitter,Facebook等過濾器 –

+0

我可以直接訪問Twitter。 – Lee

回答

0

我回到了這個問題,這個時候我想我的再生API密鑰,而現在它正在發揮作用。也許我以前的鑰匙是duds。

0

另一個項目是尋找電腦的時間。查看Twitter響應中的服務器時間,並將其與您正在使用的計算機進行比較。此外,這裏的來自Twitter網站故障排除指南:

https://dev.twitter.com/discussions/204

0
public static void UploadTweet(string token, string tokensecreat, byte[] img, string Title) 
     { 
      Twitterizer.OAuthTokens tokens = new Twitterizer.OAuthTokens(); 
      tokens.AccessToken = token; 
      tokens.AccessTokenSecret = tokensecreat; 
      tokens.ConsumerKey = TWITTER_CONSUMER_KEY; 
      tokens.ConsumerSecret = TWITTER_CONSUMER_SECRET; 
      byte[] photo = img; 

      TwitterResponse<TwitterStatus> response = TwitterStatus.UpdateWithMedia(tokens, Title, photo, new StatusUpdateOptions() { UseSSL = true, APIBaseAddress = "http://api.twitter.com/1.1/" }); 
      if (response.Result == RequestResult.Success) 
      { 

      } 
      else 
      { 

      } 
     }