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

前端 未结 6 1763
走了就别回头了
走了就别回头了 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 19:23

    A much simpler solution worked for my case (I don't know if this is the more elegant way though):

    public boolean isLoggedIn() {
        AccessToken accessToken = AccessToken.getCurrentAccessToken();
        return accessToken != null;
    }
    

提交回复
热议问题