SignInWithFacebookAsync failure

I'm in the midst of creating leaderboards for my game, and I've come across this issue with the AuthenticationService. Calling await AuthenticationService.Instance.SignInWithFacebookAsync(token); causes an exception "unable to validate token" every time.
9450638--1326800--upload_2023-11-4_18-52-14.png

I'm using Unity 2023.19f1 and Authentication V3.1.0.

My Facebook app that I created is a Gaming type app, not Consumer type. I need the Gaming type to access things like the user's screen name and avatar.

9450638--1326803--upload_2023-11-4_18-54-59.png

Hello

We do not officially support the gaming app type at this time as mentioned in our documentation https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-facebook.

However, there is a workaround to setup a gaming type Facebook application.
The app id must be registered with a GG| prefix. This only needs to be done in the identity provider setup for Unity Authentication (in the dashboard or editor settings). The configuration entry would look something like GG|1234567890.

We haven't extensively tested this app type at this point.

1 Like

Thank you. How would I get the user's name? Is authentication just for persistence, then? And things like User name would be managed via my game?

For a display name, UGS has a unique player name solution if this is something you are interested in.
The functionality is available through the Authentication SDK which you are using. (You may need to update your version)

Documentation can be found here
https://docs.unity.com/ugs/en-us/manual/authentication/manual/player-name-management

You can also use cloud save to persist any data you want to be able to retrieve across devices, installs and players.