question

Ethan K. G avatar image
Ethan K. G asked

Adding Friend by using Display Name returns error: User not found

Got error when call PlayFabClientAPI.AddFriend: "/Client/AddFriend: User not found". It only happens when using DisplayName as the parameter.

The source code is borrowed from here:

https://github.com/PlayFab/UnicornBattle/blob/c86e2884643ccb5918ba21ce101fe88f94a429ac/UnicornBattle/Assets/Scripts/PF_StaticsAndHelpers/PF_PlayerData.cs#L500

Any hint is appreciated.

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

Would you reproduce this issue via RESTful testing tools like Postman? In addition, would you also check if you have allowed non-unique display name in your title at [Title Settings] -> [General] -> [Player Account Features]? Because if enabled, players are not able to add friend with display name, while this setting cannot be undone.

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.

Ethan K. G avatar image Ethan K. G commented ·

"Allow non-unique player display names" is enabled. So I think this is the reason.

Thanks!

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.