question

Matthew Draper avatar image
Matthew Draper asked

Identifying Steam friends vs other friends (SteamInfo result empty)

Hi, we're adding cross-platform friends lists to our game. We call GetFriendsList with IncludeSteamFriends = true, which works fine.

But later calling 'RemoveFriend' for a Steam friend fails with "AccountNotFound", even though the account exists in PlayFab. However 'RemoveFriend' works OK for non-Steam friends.

So I guess we should not allow the player the option to "RemoveFriend" if that friend is also a Steam friend? (Because that would have to be done in the player's Steam account).

*But* - the SteamInfo field in the return value from GetFriendsList is *empty* for known Steam friends, so we cannot distinguish Steam friends from non-Steam friends.

Please can anyone shed any light?
Kind regards

-Mat

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

·
Citrus Yan avatar image
Citrus Yan answered

Did you call Client/GetFriendsList? In that case, one thing to note is that the Client API only returns private account info specific to the calling players themselves, other players account info are not returned. You should be able to retrieve other players account info (including steam info) using Server/GetFriendsList from the server side. For more details, please see: https://community.playfab.com/questions/970/211664407-How-to-get-another-player-s-account-Steam-ID-.html

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.

Matthew Draper avatar image Matthew Draper commented ·

Thanks for the reply, yes this is Client/GetFriendsList. We don't actually *need* other player's Steam info, we just need to be able to distinguish Steam friends from non-Steam friends (so we can hide the 'remove friend' option).

I suppose we could call GetFriendsList twice, once with and once without 'IncludeSteamFriends' - then compare the two lists, but that seems slow and wasteful.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Matthew Draper commented ·

Or you can retrieve it once by calling server/GetFriendList via CloudScript.

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.