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 7699441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:28:46+00:00 2026-05-31T22:28:46+00:00

In facebook tutorials I see this sample code: @Override public void onActivityResult(int requestCode, int

  • 0

In facebook tutorials I see this sample code:

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    facebook.authorizeCallback(requestCode, resultCode, data);
}

Using this code I receive:
onAuthFail with error= “Action canceled”.

Removing

super.onActivityResult(requestCode, resultCode, data);

It works fine.

So my question is: Where to put super.onActivityResult(requestCode, resultCode, data)?
Before facebook callback, after or delete it. At moment without calling super.onActivityResult – code works fine. Can missing cause problems?

UPDATE:

I’m using this in manifest:

<activity android:launchMode="singleInstance" android:name=".profile.LoginForm" 

android:screenOrientation=”portrait” android:noHistory=”true”>

Can this produce problem?

UPDATE2:

Reason to put ‘singleInstance’ in manifest is: to avoid relaunching of my login form. This problem forced to current problem.

  • 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-31T22:28:48+00:00Added an answer on May 31, 2026 at 10:28 pm

    Regarding your update:

    android:launchMode="singleInstance" 
    

    does indeed cause problems with startActivityForResult() and onActivityResult(). See the launchMode documentation:

    A “singleInstance” activity, on the other hand, permits no other activities to be part of its task. It’s the only activity in the task. If it starts another activity, that activity is assigned to a different task.

    Which means that the started facebook auth activity is not part of your current task and therefore can’t deliver any result(s). If you debug this, you should notice that onActivityResult() gets called immediately after the sub-activity has been started (which is way too early to have a correct/useful result).

    I’d say change your launchMode to something different (also not to singleTask, it has the same issue).

    I’m not sure how the superclass method affects this though, since you claim this fixed it. In theory this should never work with singleInstance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed this tutorial here: http://www.dannyherran.com/2011/02/facebook-php-sdk-and-codeigniter-for-basic-user-authentication/ It works great but when I enable CSRF
With help of this post and this tutorial I have managed to integrate Facebook
Pretty much all the tutorials I found on authenticating users using Facebook, make use
I was following the tutorial here: http://net.tutsplus.com/tutorials/php/how-to-authenticate-your-users-with-facebook-connect/ But I can't get past the first
I am somewhat confused by the facebook developers guide. Some tutorials show the javascript
Is there any info to be found on what data does facebook store on
I'm trying out the tutorials for Facebook developers. However, I can't include the Facebook
I am tryin to integrate Facebook in my Android app. In some tutorials, I
From one tutorials here: Post a reply on a comment in Facebook using cURL
Most of the examples and tutorials I have found for the Facebook SDK are

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.