Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if the token is disabled by Twitter's setting. #30

Open
mystasly48 opened this issue Jun 28, 2020 · 1 comment
Open

Crash if the token is disabled by Twitter's setting. #30

mystasly48 opened this issue Jun 28, 2020 · 1 comment
Labels
Bug Report a bug or unexpected behaviors (for developers and users)

Comments

@mystasly48
Copy link
Owner

CoreTweet.TwitterException: Invalid or expired token. ---> System.Net.WebException: リモート サーバーがエラーを返しました: (401) 許可されていません
   場所 System.Net.HttpWebRequest.GetResponse()
   場所 CoreTweet.Request.HttpPost(Uri url, String contentType, Byte[] content, String authorizationHeader, ConnectionOptions options)
   場所 CoreTweet.Request.HttpPost(Uri url, IEnumerable`1 prm, String authorizationHeader, ConnectionOptions options)
   場所 CoreTweet.Core.TokensBase.SendRequestImpl(MethodType type, String url, IEnumerable`1 parameters, ConnectionOptions options)
   --- 内部例外スタック トレースの終わり ---
   場所 CoreTweet.Core.TokensBase.SendRequestImpl(MethodType type, String url, IEnumerable`1 parameters, ConnectionOptions options)
   場所 CoreTweet.Core.TokensBase.AccessApiImpl[T](MethodType type, String url, IEnumerable`1 parameters, String jsonPath)
   場所 CoreTweet.Rest.Statuses.Update(String status, Nullable`1 in_reply_to_status_id, Nullable`1 possibly_sensitive, Nullable`1 lat, Nullable`1 long, String place_id, Nullable`1 display_coordinates, Nullable`1 trim_user, IEnumerable`1 media_ids, String attachment_url, Nullable`1 auto_populate_reply_metadata, IEnumerable`1 exclude_reply_user_ids, Nullable`1 include_ext_alt_text, Nullable`1 tweet_mode, Nullable`1 enable_dm_commands, Nullable`1 fail_dm_commands)
   場所 Mystter_SendTweet.Form1.SendTweet(String msg)
   場所 Mystter_SendTweet.Form1.sendBtn_Click(Object sender, EventArgs e)
   場所 System.Windows.Forms.Control.OnClick(EventArgs e)
   場所 System.Windows.Forms.Button.OnClick(EventArgs e)
   場所 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   場所 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   場所 System.Windows.Forms.Control.WndProc(Message& m)
   場所 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   場所 System.Windows.Forms.Button.WndProc(Message& m)
   場所 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   場所 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   場所 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
@mystasly48 mystasly48 added the Bug Report a bug or unexpected behaviors (for developers and users) label Jun 28, 2020
@mystasly48 mystasly48 changed the title Crash when the token is disabled by Twitter's setting. Crash if the token is disabled by Twitter's setting. Jun 28, 2020
@mystasly48
Copy link
Owner Author

Is there any API that can know if the token is valid.
I thought just remove the user's auth settings if the exception was thrown, but the user will able to tweet again if the token is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report a bug or unexpected behaviors (for developers and users)
Projects
None yet
Development

No branches or pull requests

1 participant