question

Jon avatar image
Jon asked

Unlink account leaves null entry

I am using unlink facebook account API to 'unlink' facebook account from a users playfab account. Also happens when unlinking from game manager console.


However, afterwards when I check the links using GetPlayfabIdsFromFacebookIds() api - the result looks something like:

Data count: 1

{"Data":[{"FacebookId":"my_fb_id","PlayFabId":null}],"Request":{"FacebookIDs":["my_fb_id"],"AuthenticationContext":null},"CustomData":null}

Before the account has ever been linked it would look like: Data count: 0

{"Data":[],"Request":{"FacebookIDs":["my_fb_id"],"AuthenticationContext":null},"CustomData":null}

How can I restore it to original count 0 state?

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.

Seth Du avatar image Seth Du ♦ commented ·

I have tried to call GetPlayfabIdsFromFacebookIds API when linked and unlinkedFacebook ID, but cannot reproduced the issue you have mentioned.

Will you provide more details of the reproduction steps? What's the platform you are using?

0 Likes 0 ·
Jon avatar image Jon Seth Du ♦ commented ·

Hi,

To reproduce you could try the following gist on PC:

https://gist.github.com/xjjon/8f3b830fb556b6f9b8b0e43439aa9e71

Removed most of the code specific to my game and just left debug message but it still can reproduce it.

Steps

1) Login from editor to playfab (I use frictionless custom sign-on, device id is just dev string such as "MyDevUser"

2) Login to facebook from editor (this will prompt for FB access token)

3) As you see from the code, after FacebookLogin.Login() is called, it will call `

OnFacebookLoggedIn(ILoginResult result)` which checks the account info using `

PlayFabClientAPI.GetPlayFabIDsFromFacebookIDs()`

4) The first time you try this it will return the expected result.

5) Facebook account will be linked (it is called by OnFacebookLoggedIn)

6) Call Unlink Account (or unlink from game manager)

6) Turn off editor play, and restart

7) Repeat steps again, this time when logging in to facebook, it will do the check again OnFacebookLoggedIn, and you will see the printed result of GetPlayFabIDsFromFacebookIDs has the null playfab account.

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

I cannot reproduce the issue you have mentioned. Here is my reproduction steps.

  1. Login with CustomID.
  2. Link a facebook ID and set ForceLink as true
  3. Call GetPlayFabIDsFromFacebookIDs:
{
    "code": 200,
    "status": "OK",
    "data": {
        "Data": [
            {
                "FacebookId": "184266306034954",
                "PlayFabId": "8A364330FCD8671F"
            }
        ]
    }
}
  1. Call UnlinkFacebookAccount
  2. Call GetPlayFabIDsFromFacebookIDs again:
{
    "code": 200,
    "status": "OK",
    "data": {
        "Data": [
            {
                "FacebookId": "184266306034954"
            }
        ]
    }
}

I am not sure if it is because you are using "dsResult.Data.Count==0" for the condition, but I believe simply checking the count is not reliable, you may need to find if a specific key exists in the callback result.

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.