Oauth_callback on Android

I created a Twitter application in which I need a user of my Android application to allow its use. I am at a point where I can name the Twitter application page in a browser and successfully resolve. However, the callback does not seem to work, I get a confirmation message and a PIN in the browser, but my activity in Android is never called (onResume does not start). Here is what i have

  • Twitter URL: http://twitter.com/oauth/authorize?oauth_token=actualtokenhere&oauth_callback=myapp:///
  • In determining my activity, I have this intent filter

    <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="myapp" /> </intent-filter> 
  • Like I said - I get confirmation, but not redirected, so the Android application is never called

+6
android oauth twitter
source share
1 answer

Well, it turned out that there is nothing wrong with my configuration. In my Twitter application, it’s just the wrong setting for “Application Type”. If you have this problem, go to the application’s editing window on Twitter and check the “browser” box for “Application Type”, and then if authentication succeeds in redirecting the browser to the URL callback address. Now - I could not use the Android-style callback URL (myapp: // twitt) as it did not pass the form validation. But it turned out - you can enter anything that is a valid URL and provide a callback URL in your code

+7
source share

All Articles