question

Arjuna avatar image
Arjuna asked

Check if a Game already has a user with customID or facebook ID

When I run the following request for a new player (me) in my game:

LoginWithFacebookRequest request = new LoginWithFacebookRequest ();
request.AccessToken = facebookAccessToken;
request.TitleId = GameTitleID;
request.CreateAccount = false; 

expected: the request fails because CreateAccount is false.

However, it logs me in because I have previously logged into a different game (project). Since I am unable to delete test projects and players, it's difficult for me to test the workflow for a user who doesn't already have an account.

Is there a way for me to directly check "Does <this> game have a user with facebook ID <X>" ?

Similar question for anonymous IDs.

 

10 |1200

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

brendan avatar image
brendan answered

All titles in your Studio share the same Publisher ID by default, and that's what determines the player accounts, so that they can be shared across all your titles (this is what enables the Player Publisher Data, for example). There are two ways to ensure you have a "clean slate" to work from for login:

1. Delete the test player accounts, using DeleteUsers.

2. Create a new Studio, so that you have a completely blank player space.

I'm not sure what you mean on anonymous IDs, though. All the authentication methods effectively work the same way - they attach to an account under your Publisher ID.

10 |1200

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

Arjuna avatar image
Arjuna answered

Sorry, I meant to say custom ID (I call it anonymous in my code). 

Thanks for the information. I'll create a new studio. 

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.