question

Matt avatar image
Matt asked

Can LinkAccount failures due to accounts 'already linked' return the other PlayFabId?

Hey folks,

Sorry I couldn't think of a better title. I'm looking to reduce my call count right now when players attempt to link accounts. If they make a call to LinkFacebookAccount and it returns saying the account is already linked, this is where I'd love to have the PlayFab Id of that other account.

I display a pop-up letting the player know the account is linked, giving them the option to choose the old save or the new one. In doing so, I show a little bit of information about the account, specifically from 1 UserData entry.

Instead of logging into the PlayFab account to get the details, I'd love to just grab them directly.

Is that possible? Thanks!

-Matt

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

·
Gosen Gao avatar image
Gosen Gao answered

You can use API Get PlayFab IDs From Facebook IDs to get that PlayFabId directly, and then you can grab the info you need with the PlayFabId.

2 comments
10 |1200

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

Matt avatar image Matt commented ·

My hope was that one of those functions would return something I could use to get the data directly. One API call would work, but if I have to make a call to get the Facebook ID, then a call to get the PlayFab ID from that Facebook ID, then another call to get the actual data...that's just too much. At that point it's easier to just Login using the Facebook account to get the data with 1 call (and its own error handling, of course, which is partially what I'd like to clean up).

Would making a LinkAccount call from an Azure function be reasonable? I haven't checked yet to see if the Link calls are ClientAPI only.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Matt commented ·

Using the API Get PlayFab IDs From Facebook IDs is a way to get the PlayFabId without effecting the current logged in user. If that doesn't meet your needs, then you can login with Facebook account directly to get the data.

There is no server side link Facebook account API, it should be called on the client side.

0 Likes 0 ·

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.