I have set up simple facebook login. For Android 2.3.6 everything works as should, user gets prompt login dialog, enters data and app goes on. I thought that it was android versions fault but it turs out that the login isn't working when there is facebook application installed on the phone!
Tested this on: Galaxy Ace 2.3.6 HTC Desire 4.1.2 Galaxy Note 4.1.2 Android emulator 4.1.2
Even the facebook samples are not working!
Every time the app is executing - else {
Log.d("SESSION NOT OPENED", "SESSION NOT OPENED");
}
It seems like session isn't opened but why is that? Followed this guide - https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
Code:
Session.openActiveSession(this, true, new Session.StatusCallback() {
@Override
public void call(final Session session, SessionState state, Exception exception) {
if (session.isOpened()) {
Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
Log.d("Access_token", session.getAccessToken());
}
}
});
} else {
Log.d("SESSION NOT OPENED", "SESSION NOT OPENED");
}
}
});
