I am trying to login with Facebook using the Facebook Android SDK, however, the status callback is fired only once with OPENING
session state. After that, a Fac
You need to call onActivityResult
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
uiHelper.onActivityResult(requestCode, resultCode, data);
}
So when login done . It comes to same activity and calls status callback with session state is opened
initialize UiLifecycleHelper
private UiLifecycleHelper uiHelper;
in oncreate need to call before setContentView
uiHelper = new UiLifecycleHelper(this, statusCallback);
uiHelper.onCreate(savedInstanceState);
and need to maintain session in
@Override
protected void onResume() {
super.onResume();
uiHelper.onResume();
}
@Override
protected void onPause() {
super.onPause();
uiHelper.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
uiHelper.onDestroy();
}