Elements Manual
Elements 2 Manual
Elements 2 Manual
  • Welcome 👋
  • QUICK START
    • Elements in Five Minutes or Less
  • General
    • General Concepts
    • N-Tier Architecture
    • Security Model
  • SCRIPTING ENGINE
    • Scripting Engine Overview
      • Intro to Resources and Cloud Functions
      • Horizontal Scaling Model
      • Database Access
      • Server-to-Server API Calls
      • Deploy Cloud Functions via Git
      • Creating and Destroying Resources
      • Cross-Resource Invocation
      • Indexing Resources
      • Coroutines
      • Manifest
  • Core Features
    • Core API Overview
    • Sessions
    • Applications
      • Facebook Application Configuration
      • Firebase Application Configuration
      • Amazon GameOn Application Configuration
      • iOS Application Configuration
      • Android Application Configuration
      • Matchmaking Application Configuration [deprecated]
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Leaderboards
    • Matchmaking
    • Followers
    • Friends
    • Reward Issuance
    • Push Notifications
    • Auth Schemes
    • Save Data
    • Schemas and Metadata Specifications
    • Queries
      • Base Query Syntax
      • Boolean Queries
      • Object Graph Navigation
      • Advanced Operators
        • .ref
        • .name
  • Web 3
    • Omni Chain Support
    • Vaults
    • Wallets
    • Smart Contracts
      • Smart Contracts: Ethereum
      • Smart Contracts: Flow
      • Smart Contracts: Solana
      • Smart Contracts: Neo
    • Know Your Customer
      • Formidium
  • CONFIGURATION
    • Using the Web Console
    • iOS and Android Product Bundles
    • Direct Database Access and Batch Configuration
  • UNITY PLUG-INS
    • Unity Plugin
    • Content Delivery Management and Unity CDN Plugin
  • DEPLOYMENT
    • Deployment Overview
      • Docker Containers
      • AWS Deployment
      • Standalone docker-compose
  • LUA SAMPLES
    • lua Samples
      • main.lua
      • event.lua
      • hello_world.lua
      • model.lua
      • startup.lua
      • HTTP Manifest
        • Example endpoint handler
        • Example operations table
  • RESTful APIs
    • Swagger and Swagger UI
    • Elements 3.0.X (Preview)
      • Applications
      • Friends and Followers
      • Digital Goods and Inventory
      • Leaderboards
      • Missions and Rewards
      • User and Profiles
      • Save Data
      • Custom Metadata
Powered by GitBook
On this page
  • Automatic Facebook Friends
  • Associating Friends
  1. Core Features

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.

PreviousFollowersNextReward Issuance

Last updated 2 years ago

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 rankings relative to other friends.

  • Friends may view each other's 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 . The Friend model contains the following properties:

  • user: The which is the other friend. This contains limited information on the User as some of it may be personally identificable.

  • profiles: The 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 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.

Leaderboard
Profiles
Users
User
Profiles
Facebook
id