Friends
Elements supports the concept of Friends between two users, which establishes a relationship that offers more engagement, such as viewing Leaderboard rankings or viewing each other's profile details.
Elements supports the concept of Friends between two Users. Friends are created at the User level and not at the Profile level. When two users are Friends, they have the following privileges.
Friends may view Leaderboard rankings relative to other friends.
Friends may view each other's Profiles associated with their account.
When one user views a User through a Friend, Elements will intentionally hide personal information.
Cloud Functions may perform friend checks and alter the behavior as the Friend API is fully exposed to the scripting engine.
Elements models Friends as a bi-directional relationship between two Users. The Friend model contains the following properties:
user: The User which is the other friend. This contains limited information on the User as some of it may be personally identificable.
profiles: The Profiles of the other User.
friendship: Indicates the kind of friendship between the Users, based on any of these options below.
NONE: There is no association between the users. This is used internally and APIs should almost never use this value.
OUTGOING: The logged-in User has requested friendship from the other user
INCOMING: The other User has requested friendship from the currently logged-in user
MUTUAL: Both users have accepted friendship.
Automatic Facebook Friends
When two Users connect with Facebook, Elements will automatically scan their friends list and mirror that association within Elements. This behavior is hardcoded in the Facebook workflow and cannot be disabled. Each new Facebook session forces a refresh of the friends list.
Associating Friends
At the time of this writing, you must write a Cloud Function to make Friend associations. This ensures that your game or application can make friend associations using the rules of your application. See the scripting API on the Friends Service for more details.
TODO: Create Doc for Scripting API on the Friends service.
Last updated