2

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();            
    }
}
Community
  • 1
  • 1
Zhenxiao Hao
  • 5,975
  • 7
  • 25
  • 46

1 Answers1

0

I got the same problem, and solved by just uninstalling the facebook app on my mobile (which was downloaded from the play store). I don't know the exact reason but it works for me. It also doesn't affect your development process because you can still got all the facebook functionalists through the facebook library.

Mati Bekuma
  • 60
  • 1
  • 7