title: facebook android SSO completes, but activity closes without calling onActivityResult()
body: <p>The problem I'm having is as the title suggests. I make the authorize() call but am never able to call authorizeCallback() because onActivityResult() is never called. SSO does complete, because it shows the permissions screen (with Don't Allow/Allow) and the app approval is shown on my Facebook settings page. Any ideas? I thought it might have something to do with the launchMode of the activity, but removed "singleInstance" and it didn't make a difference. </p>
  
  <p>As I mentioned above, I can confirm the permissions activity is started in Facebook.java. </p>
  
  <pre><code> try {
          Log.e("@@@", "Starting activity");
          activity.startActivityForResult(intent, activityCode);
      } catch (ActivityNotFoundException e) {
          didSucceed = false;
      }
  </code></pre>
  
  <p>For what it's worth, I can confirm the code used below.</p>
  
  <p>I've implemented the authorizeCallback() method in onActivityResult():</p>
  
  <pre><code>@Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      mStateHolder.getFacebook().authorizeCallback(requestCode, resultCode, data);
  }
  </code></pre>
  
  <p>.. but it's never called. The authorize method I've used is as follows:</p>
  
  <pre><code>facebook.authorize(this, new String[]{ "user_birthday" }, new DialogListener() {
          public void onComplete(Bundle values) {
              Log.e(TAG, "onComplete()");
              // I make a request here..
          }
          // ...with the other methods as well
  }
  </code></pre>
  
  <p>Other potentially useful info:
  <li>I'm running a Nexus One, 2.3.4</li>
  <li>The Facebook app is installed</li>
  <li>It works fine if I force the Dialog method, but I'm trying to get SSO working.</li></p>
  
  <p>EDIT: Urgh! After much searching, I found the problem. There was a rogue Intent.FLAG_ACTIVITY_NO_HISTORY flag in the intent (which doesn't keep the activity in the stack). Thanks everyone for attempting to answer this.</p>
  
  <p>EDIT2: removing launchMode=singleInstance does make a difference too btw.. I started getting the error "Failed to read calling package's signature".</p>