question

MoonHeonYoung avatar image
MoonHeonYoung asked

first login and last login question

Thank you every time.

I have two questions.

1. What do PlayFab's first login and last login mean?

If I log in at 5 o'clock on the 25th and the session ticket expires without relogging in, what happens to the first login and last login respectively?

2. I am writing a code that rewards once a day in the cloud code.

I only have to reward the first login of the day, how do I implement this?

I know PlayFab's progressive tutorial, but I'm curious if there is any other way.

(I.e. using first login time and last login time)

In other words, in the cloud code, how do i get the first login time of the day?

Are there any apis to get first login and last login?

how to verify the check-in state for the "player’s daily first sign-in"??

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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> 1. What do PlayFab's first login and last login mean?

PlayFab’s first login time means the time when the player is registered. Once the player is registered, the first login time will be recorded and won’t change. The last login time is the latest previous login time. [Edited]It will be updated when the player re-log the account in. Whether SessionTickets expire or not won’t affect the last login time.

>> 2. I know PlayFab's progressive tutorial, but I'm curious if there is any other way. (I.e. using first login time and last login time) In other words, in the cloud code, how do i get the first login time of the day?

As the above answer said, the first login time is the time of registration, it won’t be updated every day. If you need to record every day’s first login time, you need to store it to Read-only Player Data manually. Then you can refer to this tutorial to get it.

But for your case, we more suggest you follow the sample PrizeWheel to implement the “daily reward” feature.

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.

MoonHeonYoung avatar image MoonHeonYoung commented ·

Thank you.!

your answer this: 1 >>" It won't be updated when the player re-log the account in."

- If the login api is called once more to get a new session ticket before the session ticket expires, will the last login time not change?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang MoonHeonYoung commented ·

Apologies for the confusion, it's a typo. When players re-log in the accounts, the last login time will be updated.

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.