title: Android facebook sdk login error 1118578
body: <p>Everything was working fine, until I wanted to check what happens if the user clicks the Login with Facebook button with no internet connection available.</p>
  
  <p>A toast showed up saying: </p>
  
  <blockquote>
    <p>Login failed. Please contact the maker of this app and ask them to report issue #1118578 to Facebook.</p>
  </blockquote>
  
  <p>In the logcat I have:</p>
  
  <blockquote>
    <p>D/Facebook-authorize(2824): Login canceled by user.</p>
  </blockquote>
  
  <p>I tried to get rid of this toast and display my own error message in the <code>onCancel()</code> method - but I can't find a way to disable that toast.
  When I enabled WiFi again, single sign on didn't work anymore!</p>
  
  <p>What could be the cause of this?</p>
  
  <pre><code>    private void fbLogin() {
      facebook.authorize(this, new String[] { "email" }, new DialogListener() {
          @Override
          public void onComplete(Bundle values) {
              app.save("fb_token", facebook.getAccessToken());
              app.save("fb_expire", facebook.getAccessExpires());
              mAsyncRunner.request("me", new meRequestListener());
          }
          @Override
          public void onFacebookError(FacebookError error) {}
          @Override
          public void onError(DialogError e) {}
          @Override
          public void onCancel() {}
      });
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      facebook.authorizeCallback(requestCode, resultCode, data);
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>To answer my own question, removing <code>android:launchMode="singleInstance"</code> From the manifest in the <code>&lt;activity&gt;</code> resolved the #1118578 issue. </p>
  
  <p>However, I do need the <code>android:launchMode="singleInstance"</code> for the twitter OAuth login, as the browser passes the data back to the activity via new Intent. If I do not provide <code>android:launchMode="singleInstance"</code> in the manifest, a new activity is launched and it does not recieve the OAuth verifier.</p>
  
  <p><strong>Is there any way around this, to use Facebook and Twitter login in the same activity?</strong>
  The only solution I think of is to use a dummy activity for Twitter4j with <code>singleInstance</code>.</p>