title: How to disable facebook native app for user login
body: <p>I have a problem with facebook user login in my android application. I want users use their facebook account to login my system but when I click login button facebook native app starts and user enters email and password then native app closes and my app starts again. I dont want to use native app for this login proccess i want to open facebook login pop-up only like the other phones that does not have facebook native app.</p>
  
  <p>How can i do this?
  thanks</p>
  
  <p>Edit:</p>
  
  <p>I use the methods below for login </p>
  
  <pre><code>protected void loginToFacebook()
  {
  
  
      if( !mFacebook.isSessionValid() ) {
          Toast.makeText(mActivity, "logining", Toast.LENGTH_SHORT).show();
          mFacebook.authorize(mActivity,permissions, new LoginDialogListener());
      }
      else { 
          try {
              JSONObject json = Util.parseJson(mFacebook.request("me"));
              String facebookID = json.getString("id");
              String firstName = json.getString("first_name");
              String lastName = json.getString("last_name");
              String email = json.getString("email");
              Toast.makeText(mActivity,  mFacebook.getAccessToken()+email+"-" + firstName + " " + lastName + ". No need to re-authorize.", Toast.LENGTH_SHORT).show();
  
              appState.mFbToken = mFacebook.getAccessToken();
              appState.mFbEmail = email;
              mFacebookListener.onFacebookLoginSelected();
  
          }
          catch( Exception error ) {
              Toast.makeText( mActivity, error.toString(), Toast.LENGTH_SHORT).show();
          }
      }
  
  }
  </code></pre>
  
  <p>For listening the response</p>
  
  <pre><code>public final class LoginDialogListener implements DialogListener {
      public void onComplete(Bundle values) {
          try {
              //The user has logged in, so now you can query and use their Facebook info
              JSONObject json = Util.parseJson(mFacebook.request("me"));
              String facebookID = json.getString("id");
              String firstName = json.getString("first_name");
              String lastName = json.getString("last_name");
              String email = json.getString("email");
              Toast.makeText( mActivity, mFacebook.getAccessToken() +email+"-" +  firstName + " " + lastName + "!", Toast.LENGTH_SHORT).show();
              SessionStore.save(mFacebook, mActivity);
  
              appState.mFbToken = mFacebook.getAccessToken();
              appState.mFbEmail = email;
              mFacebookListener.onFacebookLoginSelected();
  
  
          }
          catch( Exception error ) {
              Toast.makeText( mActivity, error.toString(), Toast.LENGTH_SHORT).show();
          }
      }
  
      public void onFacebookError(FacebookError error) {
          Toast.makeText( mActivity, "Something went wrong. Please try again.", Toast.LENGTH_LONG).show();
      }
  
      public void onError(DialogError error) {
          Toast.makeText( mActivity, "Something went wrong. Please try again.", Toast.LENGTH_LONG).show();
      }
  
      public void onCancel() {
          Toast.makeText( mActivity, "Something went wrong. Please try again.", Toast.LENGTH_LONG).show();
      }
  }
  </code></pre>
  
  <p>If native app starts my dialoglistenner does not work  but if web based login pop-up starts my listenner works good.</p>
  
  <p>Any Idea?</p>