I am working on android Application. when facebook native application installed it does not work and show only two popup. but if itis not installed it redirect to facebook website and works fine .How i can resolve this . any help will be appreciated. I have checked and added all hashkey in facebook app. but still not working .
statusCallback = new SessionStatusCallback();
Session session = Session.getActiveSession();
this.isLogin = isLoginUser;
session = null;
if (session == null) {
if (savedInstanceState != null) {
session = Session.restoreSession(context, null, statusCallback,savedInstanceState);
}
if (session == null) {
session = new Session.Builder(context).setApplicationId(
"688998947797106").build();
}
Session.setActiveSession(session);
if (session.getState().equals(SessionState.CREATED_TOKEN_LOADED)) {
session.openForRead(new Session.OpenRequest(activity)
.setCallback(statusCallback)
.setLoginBehavior(
SessionLoginBehavior.SSO_WITH_FALLBACK)
.setPermissions(Arrays.asList("email")));
}
}
if (!session.isOpened() && !session.isClosed()) {
session.openForRead(new Session.OpenRequest(activity)
.setCallback(statusCallback)
.setLoginBehavior(SessionLoginBehavior.SSO_WITH_FALLBACK)
.setPermissions(Arrays.asList("email")));
} else {
Session.openActiveSession(activity, true, statusCallback);
}