Sign In Register

How can we help you today?

Start a new topic

Facebook authentication question

My users log into the game using DeviceAuthentication.


They play for a while, then they decide to use their facebook account to benefit from the social features.

If I understood correctly, a new account is automatically created by GameSparks.


But I don't want a new account, I just want the existing to be linked with facebook.


If a new account is created, I have to copy everything from the old account to the new account (currencies, virtual goods, segments, achievements, personal datas, ...) and update all other related documents. And my stats will become false.

This a huge amount of work !


I'm sure I've missed something, but I couldnt figure it out...


How do you proceed ?


Hi Eric,


If a user has performed a DeviceAuthentication and then does a FacebookConnectRequest the accounts will be merged. If you send your FacebookConnectRequest with doNotLinkToCurrentPlayer set to true, a new player will be created. Hope that clears it up for you.


Thanks,

Liam

Hi Liam,


I tried again and it seems thats the doNotLinkToCurrentPlayer parameter works for Androïd, but not for iOS.

On iOS, I get a new player whatever the value of this parameter.

Did you encountered that on your side ?


Thanks,

Eric

Epic bump !! This isn't working for the Javascript SDK! The API docs say doNotLinkToCurrentPlayer DEFAULTS to FALSE, so this shouldn't be happening at all!


I am having the 100% identical issue. I even tried forcing doNotLinkToCurrentPlayer to false, even though it should be default. Something seems wrong server side unless I'm missing something?

Unfortunately, didn't find a solution.

When I link account, I manually copy all datas from old account to the new account !

(and I pay for 2 MAU ;)

Strange, linking the Facebook account works ok for us. If you've deleted some of your "externalAuthentication" collection during testing, that may have caused a confusion for the deleted accounts. If you post the request / response pair for the FacebookConnectRequest, it may help to figure it out.

Manually copying all the data sounds awful :)

Hi Eric, 


I haven't heard of anyone else having this issue with IOS, if this is still affecting your game can you please log a ticket and we'll look into for you in more depth, you shouldn't have to be manually copying the data in this manner.


Thanks,

Liam

Hey Right know I'm having this problem in the Unity Editor. First I authenticate with the device using: 

 

new DeviceAuthenticationRequest ().Send ((response) => {
        });

 

And then I try to authenticate with Facebook:

 

        new FacebookConnectRequest ()
            .SetDoNotLinkToCurrentPlayer (false)
            .SetAccessToken (fbToken).Send ((response) => {
         
        });

 But I receive a newPlayer instead of merge.

Hi Ken

In your FacebookConnectRequest()  can you set switchIfPossible to true.
Can you try again and see if it works?

Regards
Katie

 

Login to post a comment