Hey,
Currently all my players login to Playfab using DeviceID (Mobile) \ CustomID (PC).
Some of them link there account with Facebook \ google.
If they connect to Playfab from different account (tablet \ iPad or another PC) and try to link the new account to the same Facebook \ Google. i want to be able to let them the option to load or data from the old user and unlink the old account and link the new account.
how do i do that?
Answer by Citrus Yan · Oct 21, 2020 at 09:59 AM
DeviceID and CustomID are considered as anonymous login mechanisms, which means that the player cannot log into the same account on other devices, once they lost or broke their devices, it would be hard to recover the account for them. Facebook and google, are considered as recoverable login mechanisms, which means that the players can log into their accounts on any devices as long as they have access to their facebook/google accounts.
The best practice is to suggest the players link recoverable login mechanisms, in your case, are facebook and google, to their accounts, when there are only anonymous login mechanisms linked. After that, players can log into their accounts using facebook/google on new devices, and link the current device id with the logged-in account. In this process, second account is not necessary, avoiding the trouble of migrating data from old account to new account later. For more details, please check out the doc on Login basics and best practices.
Hey,
Thanks for the answer.
This is not possible in my game. All users signed in with CustomID \ Device ID. Some of them linking their account with Facebook \ Google.
Lets take user A, he signed in by CustomID - in PC, got level 10 and tommorow he download my game from app store and sign in with his android device.
so currencly User A has two account, one from PC (facebook linked to it) and the other from android.
user a want to link his android account to facebook also in order to load all the data from the old account are marge both accounts.
how do i do that?
Since they are two sperate accounts now, you'll need to manually migrate the data, such as Player data, Statistics, Inventory, etc. We have corresponding server APIs to do that:
Player Data:
https://docs.microsoft.com/en-us/rest/api/playfab/server/player-data-management?view=playfab-rest
Player Item:
https://docs.microsoft.com/en-us/rest/api/playfab/server/player-item-management?view=playfab-rest
Character Data:
https://docs.microsoft.com/en-us/rest/api/playfab/server/character-data?view=playfab-rest
Friend List Management:
https://docs.microsoft.com/en-us/rest/api/playfab/server/friend-list-management?view=playfab-rest
...
i get that, but how do i get the old PlayfabID?
what should i do with the old account? delete it?