question

freedust92@gmail.com avatar image
freedust92@gmail.com asked

Maintain frictionless login user's data after linking platform login

InstallApp -> LoginWithAndroidDevice -> Tutorial...(Get some items)

-> Login & LinkWithFacebookLogin

I thought user's AndroidDeviceLogin PlayfabId and FacebookLogin PlayfabId is the same (so the data is maintained)

But, this case makes two different Ids, So FacebookLogin account is the new one.

How Can I continue androidLogin account to facebookLogin account?

Player DataLeaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sarah Zhang avatar image
Sarah Zhang answered

Could you please tell us, which one API did you use to link the Player account with Facebook? Is it LoginWithFacebook or LinkFacebookAccount? According to your description, you seemed to use the LoginWithFacebook to link the accounts. LoginWithFacebook is designed to log exist player in or create the new player account then log it in. It can’t be used to link the accounts. If you call the LoginWithFacebook API before you call the LinkFacebookAccount API and you set the CreateAccount field as true, a new player account would be created. You can refer to the following workflow to check the logic you designed.

Call LoginWithAndroidDevice API -> Tutorial...(Get some items) -> Use Facebook login API to log in the Facebook account, store the Accesstoken -> Call LinkFacebookAccount to link the PlayFab player account with Facebook

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

freedust92@gmail.com avatar image
freedust92@gmail.com answered

I apprecitate your answer. I tried LoginWithFacebook and LinkFacebookAccount which was wrong. Now I changed my logic,

User tries to store account safe -> LinkFacebookAccount

1) Success ( anonymous account linked to facebook )

2) AccountAlreadyLinked(1011) -> ( has previous facebook account, LoginWithFacebook)

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.