Search code examples
androidtwitter

Does Twitter SDK requires Twitter App to login?


I have an application that can signin using Twitter. Twitter SDK works perfectly when I have Twitter App install in my device but when Twitter is not install it returns an exception

Twitter: Authorization completed with an error
com.twitter.sdk.android.core.TwitterAuthException: Failed to get request token  

I have follow the instructions here.

My Question is does Twitter SDK requires Twitter App to login?


Solution

  • Yes that's the correct flow From the docs

    When attempting to obtain an authentication token, TwitterCore will use the locally installed Twitter app to offer a single sign-on experience. If TwitterCore is unable to access the authentication token through the Twitter app, it falls back to using a web view to finish the OAuth process.

    in your case since the SSO login(due to absence of the app) was not possible the webview will be automatically shown and you have to login via that and get a token.