question

Chethan V avatar image
Chethan V asked

How to implement a 2 way friend request system in PlayFab

Alright, I know this question has been asked many times, but I am still asking this because I want to know whether as of today this has been implement or not because these questions date back to being asked 7 years ago.

So a two way friend request system is a very simple thing which I want which goes like this:

Here is exactly what I need:

  1. Player A wants to be friend with Player B.
  2. Player A sends a friend request to Player B.
  3. Player B sees the friend request and accepts the friend request or declines it
  4. Then in Player A's friend list Player B is there and vice-versa

But currently in the system the it is more like a follow system in twitter ,wherein Player A can add Player B as his/her friend but not vice versa.

I saw that there is a fix for this problem via Cloud Scripting as per this post .But the Cloud scripting, I am really stuck, Thats because the documentation, somehow I can't understand from them. Secondly the video of cloud scripting in youtube there are akin to the older dashboard UI of the playfab under Automation.

In the older UI of the Playfab dashboard under "Automation" you had the revision button and could enter the cloud script. There are videos for these. But the newer UI there is this "Http" and "Queue" stuff and there is no information about these things next to it. Neither they are good videos which cover stuff. While following the documentation I somehow can't get around with it.Also further more as per the the "post" mentioned in the previous para there is no reference to the C# code which can execute this code

So is there is simpler way to achieve this without cloud scripting , because I have been working on my project for the past 3 months and this is the last piece of the puzzle and really exhausted with everything.

Friends
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

Cloud Script has been deprecated and it only remains accessible for users that had used it before. The replacement solution is Azure Function, which is much more flexible and powerful. Please refer to PlayFab CloudScript using Azure Functions Quickstart Guide - PlayFab | Microsoft Docs to implement your Azure Function.

The built-in friend system matches what you have indicated in the question, and it is more like a following system, hence the Azure Function is required.

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.

Chethan V avatar image Chethan V commented ·

I did follow the documentation , but I am stuck on two levels.


I am able to create whatever is given as per this visual studio guide, but here after 1 deploy it to cloud , I realise that C# code is needed. But as per this solution, the code is in JavaScript. Also for Visual studio , the way you need to run the the Azure function is not in much detail and depth as Visual studio code.

Then I chose Visual studio code guide dealing with JavaScript , but I am stuck in a point where I can't run the default code itself because it says azure functions core tools not installed to run visual studio code. I ran the necessary commands in commands prompt, but still it doesn't work.

The problem in these documentation are things go way ward . Do you have any other better source for this issue? I dont understand , this problem is there for the past 7 years and still yet to impemented . The legacy Cloud Scripts were easier to work with , now thats gone. I am really going nowhere

1 Like 1 ·
JayZuo avatar image JayZuo ♦ Chethan V commented ·

You can either change the JavaScript code to C# or create a new JS Azure Function project. If you have any issue with the implementation, please feel free to open a new thread with the error details you've got.

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.