question

leonard avatar image
leonard asked

AvatarUrl return null with FacebookLogin

Helllo,

TitleID - BEC6

I am using Unity and FacebookSDK with LoginwithFacebook.

I was trying to get AvatarUrl, but it is return null.

In client profile options checked avatar url.

Also I have set the ProfileConstraints show avatar url = true;

I have no idea what did I miss. Displayname work fine for me.

    public void displayLeaderBoard()
    {
    


        var request = new GetFriendLeaderboardRequest();
        if(request == null)
        {
            Debug.Log("The data is null");
        }
        else
        {
            request.StatisticName = "score";
            request.IncludeFacebookFriends = true;
            request.MaxResultsCount = 10;
            request.StartPosition = 0;


            request.ProfileConstraints = new PlayerProfileViewConstraints()
            {
                ShowDisplayName = true,
                ShowAvatarUrl = true,
                ShowLastLogin = true
            };


           
        }


        PlayFabClientAPI.GetFriendLeaderboard(request, OnRequestSuccess, OnRequestFail);
    }


Leaderboards and Statistics
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

How are you adding the AvatarURL to the player account to start? If your expectation is that it is automatically added by logging in with Facebook, then no, that's not the case.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

leonard avatar image leonard commented ·

I got it, so I have to update the avatarurl from facebook.

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.