question

HackerTester avatar image
HackerTester asked

How to get to know that a friend accepted ur request

How to get to know that a friend accepted ur request i mean if a friend A send request to friend b and then friend A is in lobby that exists in the game and friend b accepted the friend request at that time then how can i get instant update so that i can make api call and get further info if we use coroutine to get continuous update in gap of few secs but i that case i would be using a lot of api calls how can i pass info to friend A that now make a api call and show the friend in your friend list ? if anybody can help me then this could be useful for me also in email verification when the user email get verified i can do some actions regarding it instantly without making several api calls continously hope someone understands what is the ans to my problem and BTW these are the links i am following

Email verification playfab - https://docs.microsoft.com/en-us/gaming/playfab/features/engagement/emails/using-a-rule-to-verify-a-contact-email-address

Friend System (Two way friend system using cloudscripts) - https://community.playfab.com/questions/46961/add-friend-using-friend-request-with-acceptdecline.html

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

·
Rick Chen avatar image
Rick Chen answered

Base on the friend system you are following, one way is to poll every few seconds to check if the friend tag has changed, as you mentioned. But this is inefficient and may consume a lot of resources as it is unknown when the player will accept or deny the friend request. So this is not recommended. Another way is to use the Push Notifications. When the player B accepts/denies the request, you can send a push notifications to inform player A about that.

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.