question

avci-ibrahim avatar image
avci-ibrahim asked

Facebook login

In the game I am developing, the player registers with deviceId as soon as the game starts. If the player wants, he can then register with the facebook account. If the player changes his phone, he will automatically register with deviceId when he starts the game on his new phone. If he logs in with his facebook account to reach his previous playFab account, will he be able to access his previous statistics?

For example, I started the game with my first phone and registered with deviceId1. Then I logged in with my facebook account. I bought a new phone. I installed the game. I started and registered automatically with deviceId2. Now I have logged in with my facebook account to continue with my previous game statistics.

I tested it but it didn't. Where could I have done wrong?

10 |1200

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

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

In your case, the basic flow should be:

  1. Player login with device1’s ID, this will create a new PlayFab account.
  2. Player link a Facebook account to that newly created account.
  3. Player wants to change his phone, first, log into the account with facebook/device1’s id (they will log into the same account), then unlink device1’s id and link device2’s id.
  4. Player will be able to login with facebook or device2’s id.

Your case will create 3 three distinct Player accounts, which I suppose is not what you expected.

Please follow this tutorials to learn more about login/linking best practices:

Login basics and best practices

Account linking quickstart

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.