Q:

session.isOpened() returns false even if successfully logged in to Facebook

I am new to Facebook + native Android. I obediently followed the steps in their website but I keep on receiving "false" result in session.isOpened() method even if I successfully logged in using Facebook. I believe I have set correctly the hash key, package name and class name. Could you please help me what's the problem in this code?
public class MainActivity extends Activity {

  @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);
  }

A:

Yes, finally I was able to solve this.
The problem sprung from the incorrect hash key I set in my Facebook App Settings.
To correctly generate hash key, use java6 because Facebook requires this version. I tried using java7 but it didn't work.
Please see below the correct steps in generating hash key answered by Vizzz
LINK

