Link Facebook Account Conflict Problem When updating nakama server to 2.15


Usually when we’re linking facebook account we try to catch the ApiResponseException, try to check the conflict code, then mark as if it is an account that already linked so that game could handle it (show conflict account popup, etc)

            await client.LinkFacebookAsync(session, token, true);
        catch(ApiResponseException e)
            if(e.StatusCode == (long)System.Net.HttpStatusCode.Conflict)
                result.code = SocialStatusCode.Account_FacebookALreadyLinked;


But when we’re updating to nakama 2.15 from 2.13, now everytime a conflict happen, it throws KeyNotFound exception, key was not present in the dictionary

Checked on the 2.15 release notes, it listed that it now use FB Graph API 9
We checked on our dashboard that we previously use Graph 6.0, try to set to 9.0, wait a couple of hours, the issue still occurs

Checked the logs on DEBUG for 2.13 and 2.15, shows no difference on the log when we’re trying to linkfacebook account

{“level”:“debug”,“ts”:“2021-01-15T11:55:38.078Z”,“caller”:“social/social.go:195",“msg”:“Getting Facebook profile”,“token”:“EAATz2ICsJx4BACB1fqem2pcXeeqUNBN0U0nZC21YkZAmB3LwZCJgA6qg1ZCkojLFbY7AJGMGO5QeBLzSm9wFFZB...omitted”}

We use iOSv8.2.0 facebook sdk, nakama unity 2.4.0, and nakama server 2.15

What should we do in order to handle this? is this related to updating the nakama server?


@cloudAle You’ll definitely need to update your usage of the Facebook Graph API to 9.0 or later. This is because of deprecations that are planned by Facebook and we’ve got to keep our usage ahead of that in the compatibility of the game server.

it throws KeyNotFound exception, key was not present in the dictionary

This specific error sounds like its related to an older Unity client SDK bug with how errors that contain additional properties (error details) are parsed as part of the ApiResponseException. I think you should update the client SDK to the 2.7.0 version.

Release v2.7.0 · heroiclabs/nakama-unity · GitHub

Let me know if that does not resolve the issue.

1 Like

Updating to facebook sdk 2.7.0 resolved this issue

Thanks for the help!

1 Like