title: Android Facebook Login Prolem
body: <p>I just followed the steps in this website:</p>
  
  <p><a href="https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/" rel="nofollow">https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/</a></p>
  
  <p>The result on my simulator is correct(It will show "Hello + name").</p>
  
  <p>But when I test my application on my phone,</p>
  
  <p>It will show nothing.</p>
  
  <p>Can Anybody tell me what's wrong,thanks!!</p>
  
  <p>Following is my code:</p>
  
  <pre><code>  @Override
  
    public void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_main);
  
      // start Facebook Login
  
      Session.openActiveSession(this, true, new Session.StatusCallback() {
  
        // callback when session changes state
  
        @Override
  
        public void call(Session session, SessionState state, Exception exception) {
  
          if (session.isOpened()) {
  
            // make request to the /me API
  
            Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {
  
              // callback after Graph API response with user object
  
              @Override
  
              public void onCompleted(GraphUser user, Response response) {
                if (user != null) {
                  TextView welcome = (TextView) findViewById(R.id.welcome);
                  welcome.setText("Hello " + user.getName() + "!");
                }
              }
            });
          }
        }
      });
    }
  
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
    }
  </code></pre>