1
votes

I am trying to setup OAUTH for my twitter related app .I am using a callback url which gets the access token inside my application .

However I am getting the following error :- onReceivedError -2 http://www.someurl.com/auth/twitter/callback?&oauth_token=ajGYfwX5YauPcHnUIQCjFf1pFBGmhBEhAxFv8Ej6Ns&oauth_verifier=VBWZ5HaDMwGzrzbGOUlEQhUbZmKoLzWXVRqSxBUZI The URL could not be found.

My Browser shows page not responding .

My CallBack Url =http://www.someurl.com/auth/twitter/callback .

I am using onNewIntent for receving the intent from my browser .

          public void onNewIntent(Intent intent)
    {
        super.onNewIntent(intent);
    System.out.println("Here ");

        Uri uri = intent.getData();
        String oauthToken = uri.getQueryParameter("oauth_token");
        String oauthVerifier = uri.getQueryParameter("oauth_verifier");
     }

Manifest File :-

    <activity android:name=".Testing" android:launchMode="singleTask">>
        <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="x-oauthflow-twitter" android:host="callback" />
        </intent-filter>
    </activity>
1

1 Answers

1
votes

The call back is a bit odd, it's actually in the format scheme://host.

So for your app, based on the manifest file, it would be "x-oauthflow-twitter://callback". This means that you'll have to specify that url as the callback url in your code too.