Migrating from Facebook Login for Gaming
Updated: May 7, 2026
Copy for LLM
This guide is for developers who are currently using Facebook Login for Gaming
Background: What Was Facebook Login for Gaming?
Facebook Login for Gaming was a specialized login flow designed for native mobile games, web games, and console games that wanted to integrate with Facebook’s social features. It provided:
- Gaming Profiles: A simplified, gaming-specific profile that players could create separately from their main Facebook profile. Gaming Profiles had a gaming-specific display name and avatar, and were designed to give players more control over their identity in games.
- Gaming-Specific Permissions: A permission model tailored to game use cases, including access to a player’s gaming friends (other people who played games and had a Gaming Profile), rather than the full Facebook friend list.
- Player Finder: A feature that let players discover other gamers to play with.
- Gaming Activity Sharing: APIs for sharing game achievements and activity to a gaming-specific feed.
Facebook Login for Gaming was typically used by games that were not Instant Games — games distributed through app stores, on the web, or on consoles that wanted to add Facebook social features.
Why the Migration Is Happening
Facebook is consolidating its gaming platform experiences. Facebook Login for Gaming and Gaming Profiles are being deprecated in favor of a unified model. For developers building games on the Facebook platform, the path forward is Instant Games with Zero Permissions.
This consolidation simplifies the developer experience (one platform, one SDK, one set of APIs) and provides players with a more consistent experience across all games on Facebook.
What Changes for Developers
Authentication Model
| Aspect | Facebook Login for Gaming | Zero Permissions (Instant Games) |
|---|---|---|
Login flow | Explicit login dialog. Player grants permissions. You receive an OAuth access token. | No login flow. Player is automatically authenticated through Facebook. No access token. Identity accessed through FBInstant.player. |
Permissions | Granular permissions requested at login ( gaming_profile, gaming_user_picture, user_friends, etc.) | No permission prompts. A single Terms of Service (TOS) window appears if the player has not yet accepted the Zero Permissions TOS. This only needs to happen once per account. |
Access token | Standard Facebook access token for Graph API calls | No access token. Use FBInstant.player.getSignedPlayerInfoAsync() for server-side identity verification. |
Player Identity
| Aspect | Facebook Login for Gaming | Zero Permissions (Instant Games) |
|---|---|---|
Profile type | Gaming Profile (gaming-specific name and avatar) or Real Profile, depending on player choice | Facebook profile. The FBInstant.player.getName() and FBInstant.player.getPhoto() methods return the player’s Facebook display name and profile photo. |
Player ID | Facebook user ID (may be app-scoped) | Game-scoped player ID from FBInstant.player.getID(). This is different from the Facebook user ID. You can use FBInstant.player.getASIDAsync() to retrieve the Application-Scoped ID (ASID) for users migrating from your existing app. |
Friends | Gaming friends (players with Gaming Profiles who granted the gaming_user_friends permission) | Connected players via FBInstant.player.getConnectedPlayersAsync() (friends who also play your game) |
| Aspect | Facebook Login for Gaming | Zero Permissions (Instant Games) |
|---|---|---|
Sharing | Graph API posts, Gaming Activity API | FBInstant.shareAsync(), FBInstant.updateAsync() |
Friends list | Graph API /me/friends with gaming permissions | FBInstant.player.getConnectedPlayersAsync() |
Player Finder | Dedicated Player Finder API | Not available as a standalone feature. Use contexts, tournaments, and challenges for player discovery. |
Server Communication
| Aspect | Facebook Login for Gaming | Zero Permissions (Instant Games) |
|---|---|---|
Server calls | Standard HTTPS calls from your game client, using access token for Facebook API calls | Requires Zero Permissions to be enabled for any external server communication. No Facebook access token available; use signed player info for verification. |
Step-by-Step Migration Process
Step 1: Set Up Instant Games on Your App
If your game already has a Facebook App ID:
- Go to the App Dashboard and select your app.
- Add the Instant Games product to your app if it is not already present.
- Enable Zero Permissions in the Instant Games settings. See Zero Permissions for detailed instructions.
Step 2: Convert Your Game to an Instant Game Bundle
If your game is currently a native mobile app or a standalone web app, you will need to create an HTML5 version that runs within the Instant Games platform.
For web games that already use HTML5/JavaScript:
- Remove the Facebook JavaScript SDK (
sdk.jsorall.js). - Add the Instant Games SDK to your
index.html:<script src="https://connect.facebook.net/en_US/fbinstant.8.0.js"></script>
- Restructure your game as a self-contained bundle (all files in a single directory with
index.htmlat the root). - Add an
fbapp-config.jsonfile to configure platform behaviors. See Bundle Configuration.
For native mobile games, you will need to port your game to HTML5 using a framework like Phaser, PixiJS, Cocos2d-x (HTML5 export), Unity WebGL, or similar. This is a larger effort, and the scope depends on your game’s complexity.
Step 3: Replace the Login Flow
Facebook Login for Gaming (before):
FB.login(function(response) { if (response.authResponse) { var accessToken = response.authResponse.accessToken; var userId = response.authResponse.userID; // Authenticated. Proceed with game. } }, { scope: 'gaming_profile,gaming_user_picture,gaming_user_friends' });
Instant Games (after):
FBInstant.initializeAsync().then(function() { // Player is already authenticated. No login flow needed. FBInstant.setLoadingProgress(100); FBInstant.startGameAsync().then(function() { // Game is ready. var playerID = FBInstant.player.getID(); startGame(playerID); }); });
The key difference is that there is no login dialog, no permission request, and no access token. The player is always authenticated, and the player ID is always available.
Note: To display the player’s name or photo, use overlay views instead of directly accessingFBInstant.player.getName()orFBInstant.player.getPhoto(). See Displaying the Current Player’s Profile for examples.
Step 4: Handle the Gaming Profile to Facebook Profile Transition
This is one of the most important changes to communicate to your players. With Facebook Login for Gaming, players could create a Gaming Profile with a separate gaming name and avatar. In Instant Games, the player’s identity comes from their Facebook profile.
What this means for your game:
- Display names may change. A player who used a gaming name like “DragonSlayer99” will now appear with their Facebook display name. Your game should not assume that player names are stable across the migration.
- Profile photos may change. The gaming avatar is replaced by the Facebook profile photo.
- Player IDs will change. The game-scoped player ID from
FBInstant.player.getID()is different from the Facebook user ID or app-scoped user ID you received through Facebook Login for Gaming.
Recommendations:
- If your game displays player names prominently (leaderboards, chat, friend lists), be aware that names will look different after migration.
- If your game allows custom in-game names or avatars, this transition will be less disruptive — players will retain their in-game identity even as the underlying Facebook identity changes.
- If you need to link a player’s old identity to their new Instant Games identity, you can use your backend server (via Zero Permissions) to facilitate account linking. For example, ask the player to enter a migration code, or match players based on other identifying information they provide voluntarily.
Step 5: Update Permission Checks
Facebook Login for Gaming (before):
// Check if a specific permission was granted FB.api('/me/permissions', function(response) { var permissions = response.data; var hasGamingProfile = permissions.some(function(p) { return p.permission === 'gaming_profile' && p.status === 'granted'; }); // Adjust game behavior based on granted permissions });
Instant Games (after):
There is no permission system to check. The Instant Games SDK provides a fixed set of player data and capabilities. You do not need to request or verify permissions.
// Player ID is always available after initializeAsync() var playerID = FBInstant.player.getID(); // Always available // Connected players are always available (no permission needed) FBInstant.player.getConnectedPlayersAsync().then(function(players) { // These are friends who also play your game }); // To display player names and photos, use overlay views. // See: /documentation/games/build/zero-permissions/example-game-use-cases
Remove all permission-checking logic from your game. If you have UI flows that handle “permission denied” or “permission not yet granted” states, those can be removed as well.
Friends List
Facebook Login for Gaming (before):
FB.api('/me/friends', { fields: 'id,name,picture' }, function(response) { // response.data contains gaming friends });
Instant Games (after):
FBInstant.player.getConnectedPlayersAsync().then(function(players) { players.forEach(function(player) { var id = player.getID(); var name = player.getName(); var photo = player.getPhoto(); // Use player data for leaderboards, friend lists, etc. }); });
Note that “connected players” in Instant Games are friends who also play your specific game, which is similar to the
/me/friends endpoint in Facebook Login for Gaming (which returned friends who also used your app).Facebook Login for Gaming (before):
// Gaming Activity FB.api('/me/games.achieves', 'POST', { achievement: 'https://myserver.com/achievements/first_win' });
Instant Games (after):
// Share a custom update FBInstant.updateAsync({ action: 'CUSTOM', cta: 'Play Now', image: base64EncodedImage, text: { default: 'I just earned my first win!', }, template: 'achievement', strategy: 'IMMEDIATE', notification: 'PUSH', });
The Gaming Activity API (achievements, scores, etc.) does not have a direct equivalent in Instant Games. Instead, use
FBInstant.updateAsync() and FBInstant.shareAsync() to share game events with players’ friends.Step 7: Update Server-Side Identity Verification
If your game has a backend server, you will need to update how you verify the player’s identity.
Facebook Login for Gaming (before):
// Client sends the access token to your server. // Server verifies it against the Graph API: // GET /me?access_token=USER_ACCESS_TOKEN
Instant Games (after):
Client-side:
FBInstant.player.getSignedPlayerInfoAsync('my_server_nonce') .then(function(result) { var signature = result.getSignature(); // Send signature to your server fetch('https://myserver.com/verify', { method: 'POST', body: JSON.stringify({ signature: signature }) }); });
See the SDK Reference for full details on signature verification.
Step 8: Migrate Player Data
If your game stores player data on your server keyed by the Facebook user ID or app-scoped user ID from Facebook Login for Gaming, you will need a strategy to migrate this data to the new game-scoped Instant Games player ID.
Options:
- Account linking via ASID. Use the Cross-play management tool in the App Dashboard to link your legacy app and the Instant Game. You can access this interface through Instant Games > Audience Details. Then, in your Instant Game, call
FBInstant.player.getASIDAsync()to retrieve the legacy Application-Scoped ID (ASID), which matches the user ID from your existing app. Use this to look up and merge the player’s existing backend data with their new Instant Games Player ID. This approach requires Zero Permissions for server communication. See Cross-play Management for setup instructions. - Manual account linking via your backend. When a player first opens the Instant Game, prompt them to link their existing account by entering their username, email, or a migration code that you provide through an out-of-band channel (email, in-game notification in the old version, etc.). This approach also requires Zero Permissions.
- Graceful restart. For games where player progress is less critical (e.g., casual games with minimal progression), allow players to start fresh in the Instant Game. You can use the Instant Games SDK’s built-in cloud storage (
FBInstant.player.setDataAsync()/FBInstant.player.getDataAsync()) for data persistence going forward.
Step 9: Test the Migrated Game
Thorough testing is essential. See Game Testing for a complete guide. Key areas to test:
- Authentication flow. Verify that the game loads and the player is correctly identified without any login prompt.
- Player identity. Confirm that
FBInstant.player.getID(),getName(), andgetPhoto()return correct values. - Connected players. Test that friends who also play the game appear correctly.
- Sharing and updates. Test that
shareAsync()andupdateAsync()work and produce well-formatted posts. - Server communication. If you use Zero Permissions, verify that your game can communicate with your server and that signed player info verification works correctly.
- Data persistence. Verify that player data saves and loads correctly, whether using SDK cloud storage or your own backend.
- Account linking. If you implemented account linking, test the complete flow including edge cases (invalid codes, already-linked accounts, etc.).
Frequently Asked Questions
Will my existing players lose their progress?
This depends on how you handle the migration. If you implement account linking (Step 8, Option 1), players can retain their progress. If your game’s data is simple enough to use SDK cloud storage, players will start fresh in the Instant Game but will have cloud-saved progress going forward. Plan your approach based on how important existing progress is to your player base.
Can I keep Facebook Login for Gaming running alongside Instant Games?
During the transition period, you may be able to run both versions of your game simultaneously. However, since Facebook Login for Gaming is being deprecated, you should plan to complete the migration within the announced deprecation timeline. Running both versions indefinitely is not a viable long-term strategy.
What happens to Gaming Profiles?
Gaming Profiles are being retired as part of this transition. Players who had Gaming Profiles will interact with your game using their regular Facebook profile in Instant Games. If your game relied on Gaming Profile features (custom gaming names, gaming avatars), you may need to adjust your player identity display.
Do I need Zero Permissions?
You need Zero Permissions enabled if your game communicates with any server outside of Facebook. This includes your own backend, third-party analytics, multiplayer servers, or any other external service. If your game is entirely client-side and uses only the Instant Games SDK for data and social features, you do not need Zero Permissions.
How is the friend list different?
In Facebook Login for Gaming, you accessed gaming friends (users who had Gaming Profiles and granted the
gaming_user_friends permission). In Instant Games, FBInstant.player.getConnectedPlayersAsync() returns friends who also play your specific game. The underlying pool of players is similar, but the filtering criteria differ slightly.Migration Checklist
Pre-migration preparation
- Audit your current integration. Identify all
FB.login()calls, Graph API requests, and server-side access token verifications that need to be replaced. - Plan data migration. Decide whether to implement account linking via ASIDs or allow a graceful restart. If linking, configure the Cross-play management tool in the App Dashboard.
- Evaluate engine porting. If migrating a native mobile game, select an HTML5 framework (for example, Unity WebGL or Phaser) and scope the porting effort.
- Set up the App Dashboard. Add the Instant Games product to your existing App ID.
During migration (development)
- Restructure as a bundle. Create a self-contained bundle with
index.htmlandfbapp-config.json. - Replace the SDK. Remove the legacy Facebook JavaScript SDK and integrate
fbinstant.8.0.js. - Implement the loading flow. Replace login dialogs with
initializeAsync(),setLoadingProgress(), andstartGameAsync(). - Update identity and server verification. Replace access token backend validation with
getSignedPlayerInfoAsync()signature verification. - Migrate social APIs. Replace Graph API calls with
getConnectedPlayersAsync(),shareAsync(), andupdateAsync(). - Implement data migration. If applicable, implement
getASIDAsync()to map legacy ASIDs to the new Player ID and merge backend data. - Enable Zero Permissions. Toggle Zero Permissions in the App Dashboard to allow HTTPS communication with your backend.
Post-migration (testing and launch)
- Local testing. Test the core game loop locally using a mock SDK or local HTTPS server.
- Platform testing. Upload the ZIP bundle to Web Hosting and test on the Facebook platform (iOS, Android, and desktop web).
- Social testing. Use App Dashboard test users to verify that connected players and sharing features work correctly without permission prompts.
- Data migration testing. Test the account linking flow to ensure legacy players do not lose their progress.
- App review. Submit the game for Instant Games Quality Review and ensure all configurations (Privacy Policy, App Domains) are complete.
- Push to production. Switch the App Mode to Live and push the tested bundle to production.
Next steps
- Zero Permissions Overview — Understand the full capabilities of Zero Permissions.
- Bundle Configuration — Configure your game bundle.
- Game Testing — Comprehensive testing guide.
- SDK Reference — Full API documentation.
- Get Support — Reach out if you encounter issues during migration.
Social Features