Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6853405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:30:30+00:00 2026-05-27T01:30:30+00:00

Twitter callback returns me to the main activity and not to the TwitterActivity, here

  • 0

Twitter callback returns me to the main activity and not to the TwitterActivity, here is my code. Any suggestions please?

This is my manifest:

<activity android:name=".TwitterActivity" android:launchMode="singleInstance">
    <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="twitter-callback" />
    </intent-filter>
</activity>

This is my code:

private static final String CALLBACK_URL = "twitter-callback:///";
// Some code
    private void dealWithTwitterResponse(Intent intent) {
        Uri uri = intent.getData();
        if (uri != null && uri.toString().startsWith(CALLBACK_URL)) { // If the user has just logged in
            String oauthVerifier = uri.getQueryParameter("oauth_verifier");

            authoriseNewUser(oauthVerifier);
        }
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        Log.i(TAG, "New Intent Arrived");
        dealWithTwitterResponse(intent);
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.i(TAG, "Arrived at onResume");
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:30:31+00:00Added an answer on May 27, 2026 at 1:30 am

    You can try this callback url.

      public static final String    OAUTH_CALLBACK_SCHEME   = "x-oauthflow-twitter";
            public static final String  OAUTH_CALLBACK_HOST = "callback";
            public static final String  OAUTH_CALLBACK_URL  = OAUTH_CALLBACK_SCHEME + "://" + OAUTH_CALLBACK_HOST;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query1 + '&callback=?', function (data) { console.log('JSON data string 1 is: '
So I was reading through the code on Malsup's twitter plugin and I noticed
I'm trying to integrate Twitter in my android application. I've checked Android10 and abhinavblog's
Following code does destroy records as intended, but the callback is inherited from one
How to set this SHKTwitterCallbackUrl through the Twitter Developer site ... I'm using the
This is the code to grab tweets, but i need this in PHP, can
For example, say I was using the twitter widget here: http://twitter.com/about/resources/widgets/widget_profile And I was
i'm trying to OAuth to Twitter and it then returns back to our localhost:port
So Im using Abrahams Twitter library like this: Connect.php /* Build TwitterOAuth object with
I follow tutorial from http://www.londatiga.net/it/how-to-post-twitter-status-from-android/comment-page-2/#comment-10881 . I also fix the bugs following comments. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.