- Home /
facebook login with access token
i'm using facebook sdk and playfab
I undersatand how to login at first time... but how to login automatically with access token??
not
FB.LogInWithReadPermissions()
but
FB.LogInWithAccessToken()
something like this. I cant call loginwithpermission and open the facebook app or web page for logging in every time when i lunch the app. need something to login automatically after first login. but how...??
what kind of structure should i build for this??
i Have same problème i'm not like GUI connexion pls help :}
Answer by satanas · Feb 12, 2018 at 06:14 AM
It should work as you mention without doing anything else. Consider that inside the Editor it will ALWAYS ask you for login, but once you deploy to the mobile device it should store the credentials. You don't need to do anything except for calling FB. LogInWithReadPermissions()
on start.
What I'm doing is saving the userId on PlayerPrefs
after the first login and then I just read that pref to see if it's empty. If it is not empty, then the user already logged in and I just call FB.LogInWithReadPermissions()
.
Hope it helps.
Your answer
Follow this Question
Related Questions
Facebook Login dialog 1 Answer
first steps with facebook sdk - print name in GUI 0 Answers
Facebook log in with email and password 0 Answers
Facebook Login - Android 1 Answer
Facebook SDK - Login Issue on iOS: No Prompt/Login Dialog 1 Answer