question

kashan chandia avatar image
kashan chandia asked

hey would you tell me how to friend avatar with playfab getFriendList function

I am using the playfab avatar URL on every user store on my playfab server here is the script I am using

https://pastebin.pl/view/3e837152

plz help

unity3dphotonFriends
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

As you have define List<FriendInfo> as friends, you can iterate this list to output FriendInfo, for example:

    private void OnFriendsListSuccess(GetFriendsListResult getFriendsListResult)
    {
        foreach (var friendItem in getFriendsListResult.Friends)
        {
            print(friendItem.Profile.AvatarUrl);
        }
    }

To help you know details of PlayFab API call, please check the official API document on Friend List Management - Get Friends List - REST API (PlayFab Client) | Microsoft Docs. We also recommend using RESTful testing tools like Postman to test APIs.

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.

kashan chandia avatar image kashan chandia commented ·

how to display it to separate friends.

for UI I am using:

https://pastebin.pl/view/4d30b4e7

I don't know much about playfab I am new to playfab.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ kashan chandia commented ·

Sorry for the late response. As you can see the avatar field should be filled in with a URL, usually this should be the URL that an external image hosting service provides. Simply using HTTP GET to download the images.

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.