question

Chirag Banker avatar image
Chirag Banker asked

How to invite friend using push notification

I am new at playfab and using unity3d as development environment and smartfoxsever for multiplayer.


I need to create feature like play with facebook friend using friend invite.

Have gone through Brendan post for creating friend.
But I thinking about how to invite offline friend with room code?
Can I use cloud script to invite my friend using friend's playfabid with the help of push notification?
Can I get playfabid of my friend which is not online right now but have been added as friend before?

Push NotificationsFriends
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

Using Push Notification is fine, as long as Push Notification is registered properly, target player's device will receive the notification immediately when invited. room code can be contained in the notification. To be clear, PlayFab is stateless and there is no built-in feature that can determine whether a player is offline. Push Notification will always work, if registration is proper and player's device has Internet connection to service provider (Google, Apple...)

Please refer to the document on Push Notifications quickstart - PlayFab | Microsoft Docs.
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.

Chirag Banker avatar image Chirag Banker commented ·

What's the way for user to user push notification?.

Sorry but i am new to playfab and after reading lots of topics on forum, i am little bit confused now.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Chirag Banker commented ·

First of all is to implement it according to our document. In the common scenario, it is triggered via PlayFab Automation features. You may also implement SendPushNotification API in Cloud Script/Azure Function, which can be called via Client API ExecuteCloudScript or ExecuteFunction. To avoid abusive uses, you may add verification steps before the push is sent to ensure this request is valid.

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.