Skip to main content
Version: 5.7.0

Friend

Friends in brainCloud are other users (i.e. players) that you want to share your user experience with. Friends may be existing connections from a social network (i.e. Facebook), or social connections that you make that are specific to the app and managed by brainCloud.

brainCloud can help to manage these friends - and use them for the basis of higher-level features such as social leaderboards.

The methods of this service fall into the following categories:

  • Friend management - for directly managing the list of brainCloud friends
  • Friend lookup - for looking up new friend candidates
  • Friend data access - for accessing data associated with a friend

API Summary

Friend Management

  • AddFriends - Adds brainCloud profile IDs to local friends.
  • ListFriends - Retrieves the friend summary data associated with the logged in user. Optional parameters: includeNetworkFriends and includeSummaryData
  • RemoveFriends - Removes brainCloud profile IDs from local friends.

User Lookup

By Universal ID:

By Name (not recommended - slow!):

  • FindUsersByExactName - Retrieves profile information for exactly matched user names. Optional parameter: maxResults
  • FindUsersBySubstrName - Retrieves profile information for partially matched user names. Optional parameter: maxResults
  • FindUsersByNameStartingWith - Retrieves profile information for users whose name starts with search text. Optional parameter: maxResults

By Other Identity:

Misc:

Friend Data Access

Summary Friend Data (also referred to as simply Friend Data) is special game summary data that is made available to a user's friends. This is normally used to provide additional information for use in social leaderboards and/or neighbor displays. Common examples of friend data include experience level, player level title, etc. Summary Friend data is updated via the UpdateSummaryFriendData method.

caution

Any app that relies on access to the user's Facebook friends will require the "user_friends" permission when authenticating with Facebook. See the Facebook API documentation for how to request the "user_friends" permission.