question

Rahul Patil avatar image
Rahul Patil asked

How to send friend request using playfab(PlayerA->PlayerB)??

I add a titleid in my PlayFabLogin.cs in my script and then run the script and then unity says:you made your first successful API call!

what I want:

i want to send a friend request PlayerA->PlayerB using playfab.

ex:

PlayerA->PlayerB

Player DataFriends
3 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.

Rahul Patil avatar image Rahul Patil commented ·

hello admin why my post is awiting moderation why yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

please my post should be post in home????????????????????????? plzzzzzzzzzzzzzzzzzz??

MY ALL POST YOU PUT IN AWAITING MODERATION WHY???????????????????

0 Likes 0 ·
brandon@uprootstudios.com avatar image brandon@uprootstudios.com Rahul Patil commented ·

Hi, I see your post just fine so it must have been approved recently. To avoid spam posts, new accounts usually need to wait for approval for their first (and only their first) post.

Typically, however, it's better to use clear and concise language when posting or asking for help and advice so more users and administrators here can read and understand your post.

To answer your question: There is documentation here on using a friend's list and adding/displaying friend information using PlayFab. However, you'll probably need to use your own system to display friend requests in near-realtime on client devices, unless you use something like PubSub or Photon Chat or want to just check for new requests every 15-20 seconds or so (to avoid polling too frequently). You might also find more information here, too.

0 Likes 0 ·
Rahul Patil avatar image Rahul Patil brandon@uprootstudios.com commented ·

sorry @Brandon Phillips my weired behaviours, i m first time working with playfab i m creating a playfab account.

I want the send a Friend Request Player1->Player2 using playfab. But I have no idea for the next step??

plzz @Brandon Phillips help..


0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

@Rahul Patil Hi Rahul, the Friend System in PlayFab is more like a “follow system” which does not require two-way confirmation. So there is no direct way that PlayFab provides to natively support Friend Requests. However, in this thread Brendan created provides a way to enable a two-way friend system with no contention issues to deal with. You can check it out:)

4 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.

Rahul Patil avatar image Rahul Patil commented ·

@Citrus Yan first requirement of the you have to display friend list Before you send request??

Code:

    void DisplayFriends(List<FriendInfo> friendsCache)       //Display a friend     
    {
        friendsCache.ForEach(f => Debug.Log(f.FriendPlayFabId));
    }

but, how to get friend list??

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Rahul Patil commented ·

Hi Rahul, you may need to call GetFriendsList API to retrieve friend list and display them.

0 Likes 0 ·
Rahul Patil avatar image Rahul Patil Citrus Yan commented ·

https://titleId.playfabapi.com/Client/GetFriendsList what is this??which type of url??

0 Likes 0 ·
Show more comments

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.