twitter-kit-android
twitter-kit-android copied to clipboard
Add Status Codes to Exceptions / New Exception types
This form is for reporting issues in the Twitter Kit Android library. For all other developer questions/issues about Twitter please visit Twitter Community.
We welcome your contributions to improve the SDKs — whether adding new features, creating your own library that uses Twitter Kit, or fixing bugs you find in the code. We'd love to work with you so that Twitter Kit grows with your needs.
Feature Request
Currently, when a user backs out of the Twitter login flow, the failure
method in com.twitter.sdk.android.core.Callback
is called, with a TwitterException
, that contains a message saying that the user cancelled. Thus, if an application using Twitter login wishes to perform a different action for cancelling vs. auth failure, an un-pretty string check of the exception message is required e.g. twitterException.message?.toLowerCase()?.contains("request was canceled")
.
It would be nice if status codes could be used for the different states, or if a different exception was returned for cancellations, something like TwitterAuthCancelledException
. This way string parsing and checking isn't required, and client code can be more readable.
This repository is due for retirement on 31st October 2018 per the deprecation announcement, and no further updates are planned.