title: Facebook shows two separate login dialogs and fails login
body: <p>I am logging into facebook on Android using <code>facebook android sdk (4.7.0)</code>. Most of the time it shows following dialog and works fine.</p>
  
  <p><a href="https://i.stack.imgur.com/LpczC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LpczC.png" alt="working dialog"></a></p>
  
  <p>But sometimes it shows the following dialog and login <strong>does not work.</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/TdaCi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdaCi.png" alt="dialog not working"></a></p>
  
  <p>What are possibilites for failed login in this case? I am testing it on <code>android (5.1.1)</code>.</p>
  
  <pre><code>  facebookButton.setReadPermissions(Arrays.asList("public_profile, email, user_birthday"));
          callbackManager = CallbackManager.Factory.create();
  
          facebookButton.registerCallback(callbackManager, new FacebookCallback&lt;LoginResult&gt;() {
              @Override
              public void onSuccess(LoginResult loginResult) {
                  GraphRequest request = GraphRequest.newMeRequest(
                          loginResult.getAccessToken(),
                          new GraphRequest.GraphJSONObjectCallback() {
                              @Override
                              public void onCompleted(
                                      JSONObject object,
                                      GraphResponse response) {
                                  // Application code
                                  try {
                                      fbid = object.getString("id");
                                      fbfirst_name = object.getString("first_name");
                                      fblast_name = object.getString("last_name");
                                      fbemail = object.getString("email");
                                      new FBRegistrationService().execute();
  
                                  } catch (Exception ex) {
                                      ex.printStackTrace();
                                  }
                              }
                          });
                  Bundle parameters = new Bundle();
                  parameters.putString("fields", "id,name,email,gender,birthday,first_name,last_name");
                  request.setParameters(parameters);
                  request.executeAsync();
              }
  
              @Override
              public void onCancel() {
  
              }
  
              @Override
              public void onError(FacebookException exception) {
              }
          });
  </code></pre>
  
  <blockquote>
    <p><strong>Update</strong>: I am also getting these logs.</p>
  </blockquote>
  
  <pre><code>"Blink deferred a task in order to make scrolling smoother. Your timer and network tasks should take less than 50ms to run to avoid this. Please see https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-performance/rail and https://crbug.com/574343#c40 for more information.", source: https://m.facebook.com/login.php?skip_api_login=1&amp;api_key=350893648453711&amp;signed_next=1&amp;next=https%3A%2F%2Fm.facebook.com%2Fv2
  </code></pre>