I'm following the Scrumptious sample tutorial to implement the Facebook login for my Android app, which contains the code below. When I tested it on the emulator, it worked fine, but when I used the USB debugging, session.isOpened() always returned false. I also generated the key hash following this tutorial.
@Override
protected void onResumeFragments() {
super.onResumeFragments();
Session session = Session.getActiveSession();
if (session != null && session.isOpened()) {
startActivity(new Intent(this, LoggedMainActivity.class));
} else {
showLoginFragment();
}
}