OSDN Git Service

TwitterCredentialOAuth1に渡す引数の誤りを修正
authorKimura Youichi <kim.upsilon@bucyou.net>
Fri, 22 Dec 2023 15:36:27 +0000 (00:36 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Fri, 22 Dec 2023 15:40:10 +0000 (00:40 +0900)
Fixes: b43c97bf ("ITwitterCredentialとアクセス手段ごとの具象クラスを追加")

CHANGELOG.txt
OpenTween/Setting/SettingCommon.cs

index e1c1e5a..69dcaf4 100644 (file)
@@ -1,6 +1,7 @@
 更新履歴
 
 ==== Unreleased
+ * FIX: OAuth 1.0a によるAPIアクセスに失敗する不具合を修正
 
 ==== Ver 3.10.0(2023/12/16)
  * NEW: graphqlエンドポイント経由で取得した引用ツイートの表示に対応
index 488d926..c57f1ee 100644 (file)
@@ -354,7 +354,7 @@ namespace OpenTween
         public string Username = "";
         public long UserId = 0;
 
-        public APIAuthType TwitterAuthType { get; set; }
+        public APIAuthType TwitterAuthType { get; set; } = APIAuthType.OAuth1;
 
         public string TwitterOAuth1ConsumerKey { get; set; } = "";
 
@@ -405,7 +405,7 @@ namespace OpenTween
             return appToken.AuthType switch
             {
                 APIAuthType.OAuth1
-                    => new TwitterCredentialOAuth1(appToken, this.TwitterOAuth1ConsumerKey, this.TwitterOAuth1ConsumerSecret),
+                    => new TwitterCredentialOAuth1(appToken, this.Token, this.TokenSecret),
                 APIAuthType.TwitterComCookie
                     => new TwitterCredentialCookie(appToken),
                 _ => new TwitterCredentialNone(),