This feature is no longer available for new submissions. For any new submissions, please use Facebook Login. This documentation is intended solely for developers with existing integrations with Facebook Login for Gaming.
Facebook Login for Gaming enables authentication and allows your app to ask a person for permission to access their Meta data. Players can log in quickly, across multiple platforms and use custom player names and avatars.
Facebook Login for Gaming is the foundational layer that unlocks new Facebook Gaming Services like Sharing for Gaming.
Facebook Login button in the game | Facebook Login for Gaming user experience |
Optional step to customize player name | Optional step to choose an avatar |
When you registered your app with Meta, the app must have been created with the Facebook Login for Gaming use case or the Gaming Services app type. Please see banner above, this is no longer an option for new integrations.
Limited Login offers a login path that implements steps designed to prevent the fact that a person used Facebook to log in to your app from being used to target advertising or measure advertising effectiveness.
Limited Login returns an AuthenticationToken
that wraps an OpenID Connect token. The ID token cannot be used to request additional data using the Graph API, such as friends, photos, or pages. Doing so requires the use of classic Facebook Login.
A successful login populates a global AuthenticationToken
instance. You can provide a nonce for the login attempt that will be reflected in the return token. In addition, Limited Login populates a shared profile instance that contains the basic information including ID, name, profile picture, and email (if granted by the user).
It’s highly recommended to use Facebook SDK to integrate with Facebook Login for Gaming, which supports the same SDK methods as Facebook Login. If this is the first time you're integrating the Facebook SDK into your App, refer to the configuration guide before proceeding.
Compatible Facebook SDK will also make graph API calls to the gaming graph domain (graph.fb.gg) based on token received. Read more about gaming graph domain. The minimal SDK requirement for different platform are as follows:
Developers can also manually implement the support for Facebook Login for Gaming and gaming graph domain, using following methodology:
Currently supported permissions for Facebook Login for Gaming are:
Permission | Granted Access | Required/Optional | Need App Review |
---|---|---|---|
| User's player name and avatar. This replaces | Required | No |
| User's first name and profile picture. | Optional | No |
| User's email address. | Optional | No |
| User's Facebook friends who play the same game and granted this permission. | Optional | Yes |
Any other permission requested will be ignored and returned as denied.
To request user's profile picture, add gaming_user_picture
into the list of permissions requested during login. This permission does not require App Review. When requesting this permission, Facebook Login for Gaming will provide two options for users to choose from:
When | When |
gaming_profile
and gaming_user_picture
permissions will be granted to application. GET graph.fb.gg/me/picture // return profile picture
gaming_profile
permission will be granted to application. GET graph.fb.gg/me/picture // return avatar
Once gaming_user_picture
is added into the list of permissions requested during login, the default profile type can be customized by enabling/disabling the Select Real Profile By Default
option on Facebook Login For Gaming Setting. If it's enabled, user's profile picture and name is preselected as the default login option; Otherwise, their gaming avatar and name is preselected.
Please note: this feature only sets the preselected profile type, users can still change to the other profile type to continue. Also, if user has logged in before, default profile type for them will be the one they chose last time.
After integrating Facebook Login for Gaming, your application will gain access to the user’s player name and avatar, or first name and profile picture depends on permission granted by user. You can access them through the FB SDK or directly via our graph API, by calling gaming graph domain (graph.fb.gg):
Query user's player name:
GET graph.fb.gg/v7.0/me?field=name
Query user's avatar or profile picture:
GET graph.fb.gg/v7.0/me/picture
Query user’s granted permissions:
GET graph.fb.gg/v7.0/me/permissions
Query user’s Facebook Friends who also play:
GET graph.fb.gg/v7.0/me/friends
For a full list of available endpoints on gaming graph domain, refer to this document.
After users connected account with Facebook Login for Gaming, your application will receive app-scoped user IDs as identifier for each user. If your application has integrated with Facebook Login before enabling Facebook Login for Gaming, users' app-scoped user IDs will not change, to allow progress be carried over.
After your app has been added to the allow list, visit the Facebook developer panel to configure Facebook Login for Gaming through your App’s developer dashboard:
https://developers.facebook.com/apps/<APP_ID>/game-addins/gaming-login/
If you can't access this page, your application might need to enroll in Gaming Services. Follow the instructions on enrolling your application.
There are several configuration options available for Facebook Login for Gaming:
To start exploring the features without impacting your production builds, we recommend creating a Test App based on your production app. A new Test App can be added through the app dashboard.
The newly created Test App will be loosely coupled with your main App, but with its own App ID. This allows you to test the Login feature safely without impacting your production builds. We require this App ID to be on the allow list together with the main App ID to be enabled for Facebook Login for Gaming.
Test Apps share the same app-scoped User ID namespace as your production app making it simpler to debug issues with app-scoped IDs, or in cases where you use a copy of your production database for development.