How to check if the user is already logged in?

前端 未结 1 1908
我寻月下人不归
我寻月下人不归 2020-12-19 15:50

I am complete new to react-native and Facebook sdk

So I have followed the tutorial given here and everything works fine, the user

相关标签:
1条回答
  • 2020-12-19 16:36

    You need to check if currentAccessToken is valid in the beginning somewhere appropriate when your app is started. If it returns null, you need to refresh the token and if refresh token is expired, redirect user to loginpage.

    AccessToken.getCurrentAccessToken().then(
                (data) => {console.log(data);} //Refresh it every time
            );
    
    0 讨论(0)
提交回复
热议问题