question

Talha Muhammad avatar image
Talha Muhammad asked

grant items to Player on first login.

Hi, I just wanted to confirm the flow.

Based on the answers on the forum, In the Rules section

Do the following

-> Name the Rule

-> Select the com.playfab.player_created event OR com.playfab.player_added_title event?

->in condition ??What to do? leave it be?

->in actions --> Grant item --> itemID/ (grant ID of item of Bundle)

Now here's what I have understood.

A "player_added_title" Event, is fired whenever the player creates an account for the first time. We should wait a few seconds(run some animation etc..) then after it call the GetInventory api separately (do not get inventory details from login success call back as it wont have that item yet).

In my game Player is logged in using deviceID. Then there is an option to link account to fb. If player chooses to link fb then we store that info on device and from that time onwards we log him into his account using loginUsingFacbook api. On both apis the createaccount bool is set to true.

Would that be an issue? changing from LoginUsingDeviceID mechanism to LoginUsingFacebook.

That's the only confusion, apart from Which event to specify in rules.

If I am correct, this whole process takes--> 1 meter tick for rule to run. "X" meter tick depends on the items granted using the bundle (X amount of items in the bundle )right?. So if I have read this correctly. This whole process should run the write meter (X+1) times.

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

·
Seth Du avatar image
Seth Du answered

The process looks fine except the switching Facebook part. You should set CreateAccount bool to false to avoid separate account creation. Changing from Device ID to Facebook ID won’t be an issue because a PlayFab player account can link multiple identities for login. Usually “com.playfab.player_added_title” will be a preferred choice.

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.

Talha Muhammad avatar image Talha Muhammad commented ·

Kindly guide me wrt CreateAccount value in these two scenarios.

I have Changed My game Login Mechanism from Frictionless login to a different approach (did that to avoid Creation of Orphan/duplicate accounts).

I provide on the splash screen (for new player who just downloaded app) two options.


1.Login to your Facebook account.

2. Continue As Guest.

If Player Chooses option 2 I log him in using DeviceID.

Else If Player Chooses Option 1 I Log him in using LoginwithFacebook.

Scenario 1:
Returning User Opens The game and uses option1, Since There is already an account, No New Account will be created even If the CreateAccount Bool is True. Right?

Scenario 2:

New Player Opens the game and uses option1, Since there is no account registered with his Facebok Account, A new Account Will be created. So CreateAccount Bool= true helps.

Kindly Let me know what would happen if I set the bool to false in both scenarios. Do I need to Set the bool to false?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Talha Muhammad commented ·

Sorry for the confusion, I didn't fully understand the previous requirement you have posted in the question.

Based on the current information, I believe you may set CreateAccount Bool as true. If a Facebook account never links to a PlayFab account, this login will create a new account, while if it is already linked, the API will log this user in.

Scenario 1&2:

If there is already an account linked to this Facebook account, the API call will simply log into that account without account creation.

while if CreateAccount Bool is false, the player will only be allowed to log into an existing account. Account creation is prohibited.

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.