[Unity] AddFriendsFromPlatform/ListFriends doesn't return correct platform
-
Hello,
I see in the docs AddFriendsFromPlatform when set to sync is supposed add friends from a given platform which it does; but when I later request a list of friends the external data is null and friend platform returned says BrainCloud which is not what I was expecting to see (friendPlatform: Steam, externalId: SteamId)
What am I doing wrong?
-
This means brainCloud will automatically check the external platform for existing friend relationships, so you don’t need to call
AddFriendsFromPlatform
if they’re already Steam friends.The friend info returned depends on each user’s Steam privacy settings as well, so ensure their profiles aren’t set to private for the friends’ data to be retrieved.
-
After a conversation with brainBot, I'm told:
"To populate the "externalData" field in API responses, you'll need to use our external authentication script system with the authPayload parameter."
I was hoping Steam was already considered an external auth ! This means I need to write a steam authentication provider, a PSN provider, and so on just to mark the user with their appropriate platform/id for others to read?
I understand profiles need to be linked to brainCloud but when I call GetFriends and I've specified these friends are from Steam, why would there be no data in the response regarding the friends originating platforms?
This is really unfortunate!
Edit:
Now brainBot is saying I don't need an external provider, so I would love some clarification..Here is what I'm experiencing:
- Friend login and uses Steam auth provided by BrainCloud
- Locally call AddPlatformFriends("SYNC" or "ADD"); success
- Locally call ListFriends; returns the steam friend with only "brainCloud" returned as FriendPlatform.
-
You might be a bit unclear about the
AddFriendsFromPlatform
call. This method adds the specified externalIds as internal (which is brainCloud) friends from the given platform. Suppose users are already friends on the external platform. In that case, you don’t need to call this explicitly, brainCloud will automatically retrieve and reflect that friendship (as long as users grant your app permission).For example, if User A and User B are friends on Facebook, and both authenticate using Facebook, then when you call
ListFriends
, you’ll see their friendship automatically without needing to callAddFriendsFromPlatform
. -
brainCloud will automatically retrieve and reflect that friendship (as long as users grant your app permission)
Could you expand on this? I'm not sure what permission agreement needs to be made given I have already provided brainCloud with the publisher steam key.
Right now when I return ListFriends the list is empty while both players are: 1. Friends on steam 2. Logged into brainCloud.
-
This means brainCloud will automatically check the external platform for existing friend relationships, so you don’t need to call
AddFriendsFromPlatform
if they’re already Steam friends.The friend info returned depends on each user’s Steam privacy settings as well, so ensure their profiles aren’t set to private for the friends’ data to be retrieved.
-
Hi @devsleeper - please contact our support directly (via the support chat widget) to provide that information.
Note that I think Steam will only return friends that you have that also have the game.
Also note that Jason is correct - you don't have to use that call unless you wanted to make a local (braincloud) copy of those friend relationships.
-
Sorry for the confusion, I was under the impression a publisher key gave you certain read-only permissions on a user given they own your game (this was silly in hindsight)
While the users in question had public profiles, their privacy settings for friends lists were set to private.
Thank you for your help! I now understand what you meant by "as long as users grant your app permission".
-
D devsleeper has marked this topic as solved