Nikola Georgiev
Nikola Georgiev

Reputation: 1

Unity Facebook Authentication - the same user can login via Android but not on iOS. Different AccessToken.CurrentAccessToken.TokenString

I am trying to implement Facebook login in a game. I am using PlayFab for user management. The Facebook app is still in development with only one dev user with access.

When I build the game for Android (using PC) and login with facebook via my tester profile, the login works. Interestingly the AccessToken.CurrentAccessToken.TokenString he is assigned is always the same and is the one from https://developers.facebook.com/tools/accesstoken/

But when I build the game for iOS (using MAC) and login with facebook using the same Facebook profile, I get a different AccessToken.CurrentAccessToken.TokenString and it fails with /Client/LoginWithFacebook: Invalid Facebook token

What am I missing?

I expect that each time a Facebook user initiates a registration / login procedure, they would be assigned a new AccessToken. And it should work. But it only works with a single "hardcoded" AccessToken.

I guess that while the FB app is in development only the User Token from https://developers.facebook.com/tools/accesstoken/ works and generic tokens do not. But then why would Android always get the right token, while iOS would get different tokens?

Upvotes: 0

Views: 162

Answers (0)

Related Questions