title: Facebook Login not working through app
body: <p>I've got a problem logging in with facebook on my app.
  Logging in only works when the Android Facebook app is not installed. In that case you'll get a popup from facebook. 
  When the Facebook app is installed, the login will redirect to the app. In this case I don't get my session token back, instead I get the message: CLOSED_LOGIN_FAILED</p>
  
  <p>I've been looking all over the place, but I really can't find the problem.</p>
  
  <p>This is the code in my Fragment, The login button is created through XML:</p>
  
  <pre><code>private void initButtons()
      {
              btnFacebook.setApplicationId(v.getContext().getResources().getString(R.string.app_id));
              btnFacebook.setReadPermissions(Arrays.asList("email", "public_profile", "user_birthday"));
              btnFacebook.setFragment(this);
              btnFacebook.setSessionStatusCallback(new StatusCallback()
              {
  
                @Override
                public void call(Session session, SessionState state, Exception exception)
                {
                  Log.d("Token:",session.getAccessToken());
                }
  
              });
      }
  
  public void onActivityResult(int requestCode, int resultCode, Intent data)
      {
          super.onActivityResult(requestCode, resultCode, data);
          Session.getActiveSession().onActivityResult(this.getActivity(), requestCode, resultCode, data);
  
  }
  </code></pre>
  
  <p>Any ideas what I might be missing? Again, the login only works without the facebook app installed</p>
  
  <p>EDIT:
  I get a Session Closed Login Failed message when the account which is used, already registered the app. When user first logs in using this app (added to their account) the results are as they should be</p>