Facebook android sdk 3.0 SSO

最后都变了- 提交于 2019-12-05 10:43:31

I made a helper function that to check if the user is still logged in (or actually has an active session) for me in my app:

public static boolean isActive() {
    Session session = Session.getActiveSession();
    if (session == null) {
        return false;
    }
    return session.isOpened();
}

Alternatively, you can call Session.openActiveSession(Context context), which according to the javadocs, will only open the session if it does not require user interaction. – Ming Li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!