title: android get facebook username and id
body: <p>i have very strange situetion. I 'm working facebook sdk in android. i wrote login code and also can check username and user id.but this code does not working when divice hase facebook application(i uninstalled it and then worked perfect) 
  this is a my code</p>
  
  <pre><code>public void LoginFacebook() {
  
      mFacebook.authorize(this, mPermissions, new LoginDialogListener());
  
  }
  
  private final class LoginDialogListener implements DialogListener {
  
      public void onComplete(Bundle values) {
          SessionStore.save(mFacebook, getApplicationContext());
  
          getProfileInformation();
  
      }
  
      public void onCancel() {
          SessionEvents.onLoginError("Action Canceled");
      }
  
      @Override
      public void onFacebookError(FacebookError error) {
          SessionEvents.onLoginError(error.getMessage());
  
      }
  
      @Override
      public void onError(DialogError error) {
          SessionEvents.onLoginError(error.getMessage());
  
      }
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
  
  }
  
  @SuppressLint("SdCardPath")
  public void getProfileInformation() {
  
      mAsyncRunner.request("me", new BaseRequestListener() {
  
          @SuppressLint("CommitPrefEdits")
          @Override
          public void onComplete(String response, Object state) {
  
              final String json = response;
  
              runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
  
                      try {
  
                          JSONObject profile = new JSONObject(json);
                          facebook_userid = profile.getString("id");
                          facebook_username = profile.getString("name");
                          facebook_username = facebook_username.replace(
                                  "%20", " ");
  
                          editor.putString("fb_name", facebook_username);
  
                          editor.putString("fb_id", facebook_userid);
  
                          fb_name.setText(facebook_username);
  
                          getFacebookAvatar(facebook_userid);
                          editor.commit();
                      } catch (JSONException e) {
  
                          e.printStackTrace();
                      }
  
                  }
              });
  
          }
  
          @Override
          public void onIOException(IOException e, Object state) {
          }
  
          @Override
          public void onFileNotFoundException(FileNotFoundException e,
                  Object state) {
          }
  
          @Override
          public void onMalformedURLException(MalformedURLException e,
                  Object state) {
          }
  
          @Override
          public void onFacebookError(FacebookError e, Object state) {
          }
      });
  }
  </code></pre>
  
  <p>i have no idea what is a wrong.
  if anyone knows solution please help me thanks</p>