java - Spring Android Twitter Callback URL -


i need implement oauth login in android application using twitter api. found great project on github (spring-android-samples) example, have problem respect parameter "callback url".

when submit login , password, android application opens browser instance (with callback url) rather processing response in background:

enter image description here

has had implement similar , me please? thank you!

you don't have register x-android-org-springsource-twitterclient://twitter-oauth-response url twitter app settings. in fact, callback url configured on twitter doesn't matter in case. callback url sent twitter within request fetch oauth request token.

note within androidmanifest.xml there specified <intent-filter> twitterweboauthactivity configures callback url. filter tells android redirect requests activity.

<activity     android:name=".twitterweboauthactivity"     android:excludefromrecents="true"     android:nohistory="true" >     <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:host="twitter-oauth-response"             android:scheme="x-org-springsource-android-twitterclient" />     </intent-filter> </activity> 

note in res/values/connect_settings.xml twitter_oauth_callback_url string again configured.

<string name="twitter_oauth_callback_url">x-org-springsource-android-twitterclient://twitter-oauth-response</string> 

this string used in twitterweboauthactivity fetch twitter request token.

@override protected oauthtoken doinbackground(void... params) {     // fetch 1 time use request token twitter     return connectionfactory.getoauthoperations().fetchrequesttoken(getoauthcallbackurl(), null); } 

if want modify callback url own app, need make sure configured same in androidmanifest.xml , res/values/connect_settings.xml.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -