How to check if user is logged in with FB SDK 4.0 for Android?

前端 未结 6 1755
走了就别回头了
走了就别回头了 2020-11-30 18:56

A few days ago I implemented FB Login to my APP, and today I found out that most of the things I have implemented are now deprecated.

Before, I was using Sess

6条回答
  •  渐次进展
    2020-11-30 18:59

    According to facebook documentation you can do this by:

    AccessToken accessToken = AccessToken.getCurrentAccessToken();
    boolean isLoggedIn = accessToken != null && !accessToken.isExpired();
    

提交回复
热议问题