Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
  1. Home
  2. APIs
  3. [Unity] AddFriendsFromPlatform/ListFriends doesn't return correct platform

[Unity] AddFriendsFromPlatform/ListFriends doesn't return correct platform

Scheduled Pinned Locked Moved Solved APIs
9 Posts 3 Posters 1.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • devsleeperD Offline
    devsleeperD Offline
    devsleeper
    wrote on last edited by devsleeper
    #1

    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?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JasonL
      bitHeads
      wrote on last edited by
      #5

      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.

      1 Reply Last reply
      0
      • devsleeperD Offline
        devsleeperD Offline
        devsleeper
        wrote on last edited by devsleeper
        #2

        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:

        1. Friend login and uses Steam auth provided by BrainCloud
        2. Locally call AddPlatformFriends("SYNC" or "ADD"); success
        3. Locally call ListFriends; returns the steam friend with only "brainCloud" returned as FriendPlatform.
        1 Reply Last reply
        0
        • J Offline
          J Offline
          JasonL
          bitHeads
          wrote on last edited by
          #3

          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 call AddFriendsFromPlatform.

          devsleeperD 1 Reply Last reply
          0
          • J JasonL

            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 call AddFriendsFromPlatform.

            devsleeperD Offline
            devsleeperD Offline
            devsleeper
            wrote on last edited by
            #4

            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.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JasonL
              bitHeads
              wrote on last edited by
              #5

              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.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JasonL
                bitHeads
                wrote on last edited by
                #6

                Also, please provide us with your brainCloud app ID along with the associated profile IDs for those users.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JasonL
                  bitHeads
                  wrote on last edited by
                  #7

                  Please contact us via our support chat to provide the info above.

                  1 Reply Last reply
                  0
                  • Paul WinterhalderP Offline
                    Paul WinterhalderP Offline
                    Paul Winterhalder
                    brainCloudAdmin
                    wrote on last edited by
                    #8

                    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.

                    1 Reply Last reply
                    0
                    • devsleeperD Offline
                      devsleeperD Offline
                      devsleeper
                      wrote on last edited by
                      #9

                      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".

                      1 Reply Last reply
                      0
                      • devsleeperD devsleeper has marked this topic as solved on

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Solved
                      • Unsolved
                      • Users