question

Joshua Strunk avatar image
Joshua Strunk asked

Friend system clarifications

Linking to other posts at the top for anyone search for info on the current state of the friend system.

Friends Managment Flow

Player A send AddFriend with player B, and then player B call GetFriendsList, Player B can't see player A as a friend.

Two-way friend confirmation with Cloud Script

More looking for confirmation on a few points, and possible discussion on the points.

The current friend system is a follow system, but in my searching, I have found no way for a player to get the list of players who are following them.This does not exist, correct?

There is a way to tag friends but there is no way to make this server authoritative, correct?

I would hazard a guess that the API will not see a GetFollowers call until you have a two-way friend system as a GetFollowers combined with GetFollowed(GetFriends) makes a two-way friend system trivial.

apisFriends
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

·
brendan avatar image
brendan answered

Correct, the GetFriendsList call returns those players who have been added to the local player's friends list. There isn't currently a "get the list of people whose friends lists I'm in". The best way to handle this would be with a Cloud-Script based two-way friends system, such as those described in the linked threads. And actually, one simplification to that process would be to just use the friend tags to mark people as "followerOnly", "twoWayFriend", etc. When we do add a supported two-way friend system, you're correct that it will cover those scenarios, but for now I'd recommend the Cloud Script route.

And yes, you can absolutely make this server authoritative. The Add/Remove/Get friend API calls are available via the Server API, so you could use the API Permission Policies (https://blog.playfab.com/blog/permission-policie) to turn off all those calls in the Client API, so that they could only be used from Cloud Script (or a custom game server). I do see that the call to set friend tags is not yet exposed in the Server API, but that's a trivial change, so I'll add it to a near-term worklist.

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.