I found from Brendan that there is no friend request option available in PlayFab and we can never expect in the future as PlayFab don't work on - Friends, in game chat etc. But now I wanted to know can we use execute cloud scripts in the update function of PlayFab or no. As per my knowledge we cannot as there are limits to the cloud scripts calls. If so how/which part of the code can I notify the receiver of the friend request using cloud scripts and SharedGroupData which was showcased in the slideshare - advanced cloud scripts.
Answer by Brendan · Nov 19, 2020 at 01:00 AM
To be clear, I would never say you should "never expect" a feature change (though I may well say "for the foreseeable future"). We are continually taking feedback from developers and reviewing the requests we get through this forum and more direct discussions. So if there's a feature you want, it's a good idea to make sure you've let us know.
The built-in friends system in PlayFab works more similarly to a "follower" system, since it doesn't natively do two-way linking and there's no confirmation stage (accept or decline a friend request). If what you want is to build a system like that, you would want to either use polling from the client to check if there are outstanding friend requests, or else use a PubSub type model (an example is here: https://github.com/PlayFab/PlayFab-Samples/tree/master/Samples/CSharp/MessagingClient) to notify the client when there are updates it needs to check.
In addition to there being call rate limits on calls to Cloud Script, please bear in mind that each call to Cloud Script is going to "tick" the relevant meters for your title, which could wind up adding significantly to your costs.
As a side note, we would strongly recommend moving to our Azure Functions Cloud Script integration, as there are many advantages to the newer script service (debugging, more language support, being able to eliminate cold start issues with Azure Premium, etc.).
SharedGroupData Notification on Desktop 1 Answer
How to access the variables in the cloud script ? 1 Answer
How to access the variables of cloud scripts in Unity's C# script ? 0 Answers
ExecuteCloudScript Errors - 'ExecuteCloudScriptResult' does not contain a definition 0 Answers
Cloud Script Return Value Problem - Null Reference Error 1 Answer