API Reference
Updated: Jun 28, 2026
Copy for LLM
This is the complete API reference for Instant Games SDK v8.0, which includes full support for Zero Permissions. If you are using Unity, the Unity Plugin provides a C# wrapper around this API with async/await support and editor tooling. If you are upgrading from an earlier SDK version, see What Changed in v8.0 at the end of this page.
SDK initialization
These top-level methods control the SDK lifecycle. You must call
initializeAsync() before using any other SDK method.FBInstant.initializeAsync()
Initializes the SDK. This must be the first SDK call in your game. After it resolves, you can access player information, locale, and platform data.
Returns:
Promise<void>Errors:INVALID_OPERATIONFBInstant.initializeAsync().then(function() { var locale = FBInstant.getLocale(); // e.g., 'en_US' var platform = FBInstant.getPlatform(); // e.g., 'IOS', 'ANDROID', 'WEB' var playerID = FBInstant.player.getID(); // Load your game assets, then start FBInstant.setLoadingProgress(100); FBInstant.startGameAsync().then(function() { startMyGame(); }); });
FBInstant.setLoadingProgress(percentage)
Reports loading progress to the platform. The platform displays a progress bar to the player during initial load.
Parameters:
percentage— Number between 0 and 100.
Returns:
voidFBInstant.getLocale()
Returns the player’s locale string. Not accurate until
initializeAsync() resolves.Returns:
string (e.g., 'en_US', 'ja_JP')FBInstant.getPlatform()
Returns the platform the game is running on.
Returns:
string | null — Platform value (e.g., 'IOS', 'ANDROID', 'WEB'), or null if called before initializeAsync().FBInstant.getSDKVersion()
Returns the SDK version string.
Returns:
string (e.g., '8.0')FBInstant.getSupportedAPIs()
Returns an array of API function names that the current client explicitly supports. Use this to check for feature availability before calling optional APIs.
Returns:
string[]var supported = FBInstant.getSupportedAPIs(); // ['getLocale', 'initializeAsync', 'player.getID', ...]
FBInstant.getEntryPointData()
Returns the data object associated with the entry point that launched the game. For example, if a player tapped a custom update or invite, the attached data is available here. Returns
null if there is no data or the client does not support it.Returns:
Object | nullPlayer module (FBInstant.player)
The player module provides access to the current player’s identity, cloud storage, and social connections.
Identity
FBInstant.player.getID()
Returns a unique, game-scoped identifier for the current player. This ID is stable across sessions for the same player in the same game, but is different from the Facebook user ID. Do not call before
initializeAsync() resolves.Returns:
stringFBInstant.player.getASIDAsync()
Returns the player’s Application-Scoped ID (ASID). This is useful for mapping players between Instant Games and other versions of your app (such as a native mobile app or a former Canvas Game). See Canvas Game Migration for details on cross-platform identity mapping.
Returns:
Promise<string>FBInstant.player.getSignedASIDAsync()
Returns a signed version of the Application-Scoped ID for server-side verification.
Returns:
Promise<SignedASID>FBInstant.player.getSignedPlayerInfoAsync(requestPayload?)
Fetches the player’s ID along with a cryptographic signature that you can verify on your server.
getSignedPlayerInfoAsync() is the primary mechanism for server-side identity verification in Zero Permissions games — it replaces the access token model used in older platforms.Parameters:
requestPayload(optional) — A developer-specified string (up to 1000 characters when stringified) included in the signed payload. Use this to prevent replay attacks by including a server-generated nonce.
Returns:
Promise<SignedPlayerInfo>Errors:INVALID_PARAM, NETWORK_FAILURE, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.getSignedPlayerInfoAsync('server_nonce_12345') .then(function(result) { var signature = result.getSignature(); // Send signature to your server for verification });
Cloud storage
The SDK provides cloud storage for saving player data (up to 1MB per player). The SDK stores data as key-value pairs that persist across sessions.
FBInstant.player.getDataAsync(keys)
Retrieves data from cloud storage. JSON objects stored as strings are automatically parsed back into objects.
Parameters:
keys— Array of key name strings.
Returns:
Promise<Object> — An object with the requested key-value pairs.
Errors:INVALID_PARAM, NETWORK_FAILURE, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.getDataAsync(['achievements', 'currentLife']) .then(function(data) { console.log(data.achievements); // Array of achievement objects console.log(data.currentLife); // e.g., 3 });
FBInstant.player.setDataAsync(data)
Saves data to cloud storage. Only JSON-serializable values are accepted. The promise resolves when the write is scheduled, but the data may not be persisted to the server immediately.
Parameters:
data— An object with key-value pairs to save.
Returns:
Promise<void>Errors:INVALID_PARAM, NETWORK_FAILURE, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.flushDataAsync()
Forces all pending data writes to be persisted to the server immediately. This is an expensive operation — use it only for critical data like purchase receipts. For routine saves,
setDataAsync() is sufficient.Returns:
Promise<void>Errors:INVALID_PARAM, NETWORK_FAILURE, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.getConnectedPlayersAsync()
Returns an array of players who are friends with the current player and have played this game within the last 90 days. Each player object provides
getID(), getName(), and getPhoto() methods.Returns:
Promise<ConnectedPlayer[]>Errors:NETWORK_FAILURE, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.getConnectedPlayersAsync() .then(function(players) { players.forEach(function(player) { console.log(player.getID()); // Player ID console.log(player.getName()); // Display name console.log(player.getPhoto()); // Profile photo URL }); });
Zero Permissions note: Under Zero Permissions, player names and photos fromgetConnectedPlayersAsync()are not directly accessible to your game code. Use overlay views to render this information in a Meta-controlled iframe instead.
Bot subscription
FBInstant.player.canSubscribeBotAsync()
Checks whether the player can subscribe to your game’s Messenger bot. The game can show the subscription dialog at most once per week.
Returns:
Promise<boolean>Errors:RATE_LIMITED, INVALID_OPERATION, CLIENT_UNSUPPORTED_OPERATIONFBInstant.player.isSubscribedBotAsync()
Checks whether the player is already subscribed to your game’s Messenger bot.
Returns:
Promise<boolean>FBInstant.player.subscribeBotAsync()
Prompts the player to subscribe to your game’s Messenger bot.
Returns:
Promise<void>Errors:INVALID_PARAM, PENDING_REQUEST, CLIENT_REQUIRES_UPDATEContext module (FBInstant.context)
A context represents the social setting in which a game session is taking place — for example, a Messenger thread, a Facebook post, or a solo session. The context module lets you read the current context and switch between contexts to enable multiplayer and social play.
FBInstant.context.getID()
Returns the unique identifier of the current context. Returns
null for solo contexts (when the player is not playing with anyone). Do not call before startGameAsync() resolves.Returns:
string | nullFBInstant.context.getPlayersAsync()
Returns an array of players who are active in the current context (have played within the last 90 days). May include the current player.
Returns:
Promise<ContextPlayer[]>Errors:NETWORK_FAILURE, CLIENT_UNSUPPORTED_OPERATION, INVALID_OPERATIONFBInstant.context.switchAsync(id, switchSilentlyIfSolo?)
Switches to a specific context. The player may be asked to confirm the switch. Pass
"SOLO" to switch to a solo context.Parameters:
id— The context ID to switch to, or"SOLO".switchSilentlyIfSolo(optional) — Iftrue, skip the confirmation dialog when switching to solo. Defaults tofalse.
Returns:
Promise<void>Errors:INVALID_PARAM, SAME_CONTEXT, NETWORK_FAILURE, USER_INPUT, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATIONFBInstant.context.createAsync(suggestedPlayerIDs?)
Creates a new context with one or more players. Supports three usage patterns:
- Single player ID — Creates a 1-on-1 context with the specified player.
- Array of player IDs — Creates a multiplayer context with the specified players.
- No argument — Opens a friend picker for the player to choose.
Parameters:
suggestedPlayerIDs(optional) — A single player ID string or an array of player ID strings.
Returns:
Promise<void>Errors:INVALID_PARAM, SAME_CONTEXT, NETWORK_FAILURE, USER_INPUT, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATIONFBInstant.context.chooseAsync(options?)
Opens a dialog that lets the player pick a context (friend or group) to play in. You can filter and constrain the options.
Parameters:
options.filters(optional) — Array ofContextFiltervalues to limit which contexts are shown.options.maxSize(optional) — Maximum number of participants allowed.options.minSize(optional) — Minimum number of participants required.
Returns:
Promise<void>Errors:INVALID_PARAM, SAME_CONTEXT, NETWORK_FAILURE, USER_INPUT, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATIONOverlay views module (FBInstant.overlayViews)
Overlay views are Meta-controlled iframes that render player profile information (names, photos) within your game’s UI. Under Zero Permissions, direct access to player names and photos has been removed — overlay views are the replacement. You define the layout using XML, and Meta renders the content securely.
For a full guide to the XML component syntax, see Overlay View Components.
Creating overlay views
Performance Considerations
updateAsync()triggers a full re-render. There is no incremental DOM patching — the entire overlay is rebuilt, and all images are re-fetched, even if theirsrchas not changed. Throttle updates to meaningful state changes, not every frame.dismissAsync()does not free memory. The iframe remains in the DOM withdisplay: none. The overlay’s internal state, images, and event listeners are all preserved. There is nodestroy()method. Reuse overlays withupdateAsync()+showAsync()rather than creating new ones.- Separate static and dynamic overlays. Keep frequently updated overlays (like a score HUD) small, and use a separate overlay for large static content (like a leaderboard).
FBInstant.overlayViews.createOverlayViewAsync(xmlPath, domElement, iFrameStyle?, cssPath?, initialData?)
Creates an overlay view from an XML file and attaches it to a DOM element. This is the recommended method for most use cases.
Parameters:
xmlPath— Path to the XML file in your game bundle (e.g.,"overlay_views/profile.xml").domElement— TheHTMLElementto attach the overlay iframe to.iFrameStyle(optional) — CSS styles applied to the iframe element itself.cssPath(optional) — Path to a CSS file for styling the overlay content.initialData(optional) — A data object accessible in the XML via `` template expressions.
Returns:
Promise<OverlayView>You must callshowAsync()on the returned overlay view to make it visible.
var container = document.getElementById('playerCard'); FBInstant.overlayViews.createOverlayViewAsync( 'overlays/profile_card.xml', container, 'width: 100%; height: 80px; border: none;', 'overlays/styles.css', { score: 1500, rank: 3 } ).then(function(overlay) { overlay.showAsync(); });
FBInstant.overlayViews.createOverlayView(xmlPath, cssPath?, initialData?, onSuccess?, onError?)
Callback-based version of overlay creation. Use this if you prefer callbacks over promises.
Parameters:
xmlPath— Path to the XML file.cssPath(optional) — Path to a CSS file.initialData(optional) — Data object for template expressions.onSuccess(optional) — Callback invoked on successful initialization.onError(optional) — Callback invoked on error.
Returns:
OverlayViewFBInstant.overlayViews.createOverlayViewWithXMLStringAsync(xmlString, domElement, iFrameStyle?, cssPath?, initialData?, overlayFilesPath?)
Creates an overlay view from an inline XML string rather than a file. Useful for dynamically generated overlays.
Returns:
Promise<OverlayView>FBInstant.overlayViews.createOverlayViewWithXMLString(xmlString, cssPath?, initialData?, onSuccess?, onError?, overlayFilesPath?)
Callback-based version of inline XML overlay creation.
Returns:
OverlayViewConvenience methods
FBInstant.overlayViews.createProfilePictureOverlayViewAsync(domElement, imageStyle?, iFrameStyle?)
Creates a simple overlay that displays the current player’s profile picture. No XML required.
Parameters:
domElement— TheHTMLElementto attach the overlay to.imageStyle(optional) — CSS styles for the profile picture image.iFrameStyle(optional) — CSS styles for the iframe container.
Returns:
Promise<OverlayView>FBInstant.overlayViews.createProfileNameOverlayViewAsync(domElement, textStyle?, iFrameStyle?, cssPath?)
Creates a simple overlay that displays the current player’s name. No XML required.
Parameters:
domElement— TheHTMLElementto attach the overlay to.textStyle(optional) — CSS styles for the name text.iFrameStyle(optional) — CSS styles for the iframe container.cssPath(optional) — Path to a CSS file.
Returns:
Promise<OverlayView>Event handling
FBInstant.overlayViews.setCustomEventHandler(handler)
Registers a callback that fires whenever a custom event is triggered from an overlay view (via the
onTapEvent attribute on View elements).Parameters:
handler— A function that receives(eventStr, overlayID).eventStris the custom event name, andoverlayIDidentifies which overlay fired the event.
Returns:
voidFBInstant.overlayViews.setCustomEventHandler(function(eventStr, overlayID) { if (eventStr.startsWith('selectPlayer_')) { var playerID = eventStr.split('_')[1]; handlePlayerSelected(playerID); } });
Querying overlays
FBInstant.overlayViews.getOverlayViews()
Returns all overlay views that have been created.
Returns:
Map<string, OverlayView>These top-level methods let players share game content with friends, send invites, and post updates.
Opens a share dialog that lets the player post to their timeline, send to Messenger, copy a link, or share to a group. The promise resolves regardless of whether the player completes the share.
Parameters:
payload.image— Base64-encoded image data.payload.text— Share message text. Supports `` and custom template expressions.payload.data(optional) — Developer payload (up to 1000 characters when stringified). Accessible in the launched session viagetEntryPointData().payload.shareDestination(optional) — Array of destinations:'NEWSFEED','GROUP','COPY_LINK','MESSENGER'.payload.switchContext(optional) — Whether to switch context after sharing.payload.imageOverlayPath(optional) — Path to an XML file for rendering player data in the share image.payload.pathToCSS(optional) — CSS file path for the overlay.payload.initialData(optional) — Data for overlay template expressions.
Returns:
Promise<void>Errors:INVALID_PARAM, NETWORK_FAILURE, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATION, INVALID_OPERATIONFBInstant.inviteAsync(payload)
Opens a dialog that lets the player invite friends to the game. Supports customizable sections and filtering.
Parameters:
payload.image— Base64-encoded image data.payload.text— Invitation text withdefaultand optionallocalizations.payload.data(optional) — Developer payload (up to 1000 characters when stringified).payload.notificationText(optional) — Notification messaging text.payload.cta(optional) — Call-to-action button text.payload.dialogTitle(optional) — Dialog heading text.payload.filters(optional) — Array of filter types.payload.sections(optional) — Array of section configurations with max results.
Returns:
Promise<void>Errors:INVALID_PARAM, NETWORK_FAILURE, PENDING_REQUEST, CLIENT_UNSUPPORTED_OPERATION, INVALID_OPERATIONFBInstant.inviteAsync({ image: base64Picture, text: { default: 'Join me in this game!' }, data: { myReplayData: '...' } }).then(function() { // Invite dialog closed });
FBInstant.updateAsync(payload)
Sends a custom update to the current context. This is how you notify other players in the same context about game events such as score updates, turn notifications, and challenge completions.
Parameters:
payload.action— Update type. Use'CUSTOM'.payload.template— Template identifier (configured in the App Dashboard).payload.cta(optional) — Call-to-action button text.payload.image(optional) — Base64-encoded image.payload.text— Text content withdefaultand optionallocalizations.payload.data(optional) — Developer payload (up to 1000 characters when stringified).payload.strategy(optional) — Delivery timing:'IMMEDIATE'or'LAST'.payload.notification(optional) — Push notification behavior:'PUSH'or'NO_PUSH'(default).
Returns:
Promise<void>Errors:INVALID_PARAM, PENDING_REQUEST, INVALID_OPERATIONScores
FBInstant.postSessionScore(score)
Posts a player score synchronously. Scores should be consistent and comparable across game sessions.
Parameters:
score — Integer score value.
Returns:voidFBInstant.postSessionScoreAsync(score)
Posts a player score asynchronously. The promise resolves when all platform behavior (dialogs, context changes) completes.
Parameters:
score — Integer score value.
Returns:Promise<void>Tournaments (FBInstant.tournament)
Tournaments let players compete with friends and other players over a defined period.
FBInstant.tournament.postScoreAsync(score)
Posts the player’s score to the current tournament. Call this at the end of a game round (e.g., when the player runs out of lives). Scores must be comparable across sessions — use consistent scoring logic.
Parameters:
score — Integer score value.
Returns:Promise<void>Errors:INVALID_PARAM, TOURNAMENT_NOT_FOUND, NETWORK_FAILUREFBInstant.tournament.createAsync(payload)
Opens the tournament creation dialog. Only available outside of an active tournament session.
Returns:
Promise<Tournament>Errors:INVALID_PARAM, INVALID_OPERATION, DUPLICATE_POST, NETWORK_FAILURE, OPERATION_SUPPRESSEDOpens a dialog to reshare the current tournament with friends.
Parameters:
payload.score— The player’s score.payload.data(optional) — Additional data.
Returns:
Promise<void>Errors:INVALID_OPERATION, TOURNAMENT_NOT_FOUND, NETWORK_FAILUREFBInstant.tournament.joinAsync(tournamentID)
Requests a context switch to a specific tournament. Rejects if the player is not a participant or no connected players participate.
Returns:
Promise<void>Errors:INVALID_OPERATION, INVALID_PARAM, SAME_CONTEXT, NETWORK_FAILURE, USER_INPUT, TOURNAMENT_NOT_FOUNDFBInstant.tournament.getTournamentsAsync()
Returns tournaments the player can participate in: tournaments they created, are participating in, or that friends participate in (with permission). Expired tournaments (past their end time) are included.
Returns:
Promise<Tournament[]>Errors:NETWORK_FAILURE, INVALID_OPERATIONFBInstant.getTournamentAsync()
Fetches the tournament linked to the current context.
Returns:
Promise<Tournament>Errors:PENDING_REQUEST, NETWORK_FAILURE, INVALID_OPERATION, TOURNAMENT_NOT_FOUNDGlobal leaderboards (FBInstant.globalLeaderboards) — Deprecated
Deprecated: The Global Leaderboards API is deprecated in the restricted SDK used by Zero Permissions games. All methods reject withDEPRECATED_GLOBAL_LEADERBOARD_ERROR. Use your own backend leaderboard with arbitrary player rendering instead. See Global Leaderboards for the recommended approach.
The following methods were previously available but are no longer functional in Zero Permissions games:
FBInstant.globalLeaderboards.setScoreAsync(leaderboardID, score)FBInstant.globalLeaderboards.getScoreAsync(leaderboardID)FBInstant.globalLeaderboards.getTopEntriesAsync(leaderboardID, limit?)FBInstant.globalLeaderboards.getTopFriendEntriesAsync(leaderboardID, limit?)
Payments (FBInstant.payments)
The payments module handles in-app purchases. Payment operations require explicit player permission and are only available after
startGameAsync() resolves.FBInstant.payments.onReady(callback)
Registers a callback that fires when the payment system becomes available. Use this to know when it is safe to call other payment methods.
Parameters:
callback — A function called when payments are ready.
Returns:voidFBInstant.payments.getCatalogAsync()
Fetches your game’s product catalog as configured in the App Dashboard.
Returns:
Promise<Product[]>Errors:CLIENT_UNSUPPORTED_OPERATION, PAYMENTS_NOT_INITIALIZED, NETWORK_FAILUREFBInstant.payments.getCatalogAsync().then(function(catalog) { catalog.forEach(function(product) { console.log(product.productID, product.title, product.price); }); });
FBInstant.payments.purchaseAsync(config)
Initiates a purchase flow.
Parameters:
config.productID— The product identifier from your catalog.config.developerPayload(optional) — Custom data for your server.
Returns:
Promise<Purchase>Errors:CLIENT_UNSUPPORTED_OPERATION, PAYMENTS_NOT_INITIALIZED, INVALID_PARAM, NETWORK_FAILURE, INVALID_OPERATION, USER_INPUTFBInstant.payments.getPurchasesAsync()
Returns all unconsumed purchases. Call this at game start to process any purchases the player made but that were not consumed (for example, if the game crashed after purchase).
Returns:
Promise<Purchase[]>Errors:CLIENT_UNSUPPORTED_OPERATION, PAYMENTS_NOT_INITIALIZED, NETWORK_FAILUREFBInstant.payments.consumePurchaseAsync(purchaseToken)
Consumes a purchase, marking it as fulfilled. Call this before granting the purchased item to the player — this ensures the item is not granted again if the player restarts the game.
Parameters:
purchaseToken — The token from the purchase object.
Returns:Promise<void>Errors:CLIENT_UNSUPPORTED_OPERATION, PAYMENTS_NOT_INITIALIZED, INVALID_PARAM, NETWORK_FAILURECommunity (FBInstant.community)
Community features let players connect with your game’s official Facebook page and group.
FBInstant.community.canFollowOfficialPageAsync()
Checks whether the player can follow your game’s official page.
Returns:
Promise<boolean>FBInstant.community.followOfficialPageAsync()
Renders a follow CTA overlay for your game’s official page.
Returns:
Promise<void>FBInstant.community.canJoinOfficialGroupAsync()
Checks whether the player can join your game’s official group.
Returns:
Promise<boolean>FBInstant.community.joinOfficialGroupAsync()
Renders a join CTA overlay for your game’s official group.
Returns:
Promise<void>Errors (all community methods):
INVALID_OPERATION, NETWORK_FAILURE, PAGE_NOT_LINKED, GROUP_NOT_LINKEDRoom (FBInstant.room)
The room module supports Messenger Rooms co-play.
FBInstant.room.getCurrentMatchAsync()
Retrieves the current real-time match for the gameplay environment.
Returns:
Promise<LiveMatch>Errors:INVALID_OPERATION, INVALID_PARAM, LIVE_MATCH_NOT_FOUNDUtility methods
FBInstant.switchGameAsync(appID, data?)
Switches to a different Instant Game. The target game must be owned by the same business.
Parameters:
appID— The target game’s Facebook App ID.data(optional) — Entry data (up to 1000 characters when stringified). Accessible viagetEntryPointData()in the target game.
Returns:
Promise<void>Errors:USER_INPUT, INVALID_PARAM, PENDING_REQUEST, CLIENT_REQUIRES_UPDATEFBInstant.canCreateShortcutAsync()
Checks whether the player can create a home screen shortcut. Returns
false if already called this session.Returns:
Promise<boolean>Errors:PENDING_REQUEST, CLIENT_REQUIRES_UPDATE, INVALID_OPERATIONFBInstant.createShortcutAsync()
Prompts the player to create a home screen shortcut to your game. Can be called at most once per session. Check
canCreateShortcutAsync() first.Returns:
Promise<void>Errors:USER_INPUT, PENDING_REQUEST, CLIENT_REQUIRES_UPDATE, INVALID_OPERATIONFBInstant.performHapticFeedbackAsync()
Triggers haptic feedback on devices that support it.
Returns:
Promise<void>Errors:CLIENT_UNSUPPORTED_OPERATION, INVALID_OPERATIONError codes
All SDK errors use the following codes. Check the specific method documentation above for which errors each method can throw.
| Error Code | Description |
|---|---|
INVALID_OPERATION | The operation is not permitted in the current state (e.g., calling a method before initialization). |
INVALID_PARAM | A parameter is missing, has the wrong type, or is out of range. |
NETWORK_FAILURE | A network request failed. The player may be offline or experiencing connectivity issues. |
PENDING_REQUEST | Another request of the same type is already in progress. Wait for it to complete before calling again. |
CLIENT_UNSUPPORTED_OPERATION | The current client (platform/version) does not support this operation. Use getSupportedAPIs() to check availability. |
USER_INPUT | The player cancelled the operation (e.g., dismissed a dialog). |
SAME_CONTEXT | The player is already in the specified context. |
CLIENT_REQUIRES_UPDATE | The client version is too old to support this operation. |
RATE_LIMITED | Too many calls in a short period. Back off and try again later. |
TOURNAMENT_NOT_FOUND | The specified tournament does not exist or has expired. |
LIVE_MATCH_NOT_FOUND | No active match exists in the current Rooms session. |
OPERATION_SUPPRESSED | The platform suppressed the operation (e.g., to prevent spam). |
PAGE_NOT_LINKED | Your game’s official Facebook page is not configured in the App Dashboard. |
GROUP_NOT_LINKED | Your game’s official Facebook group is not configured in the App Dashboard. |
DUPLICATE_POST | A duplicate post was attempted (e.g., creating the same tournament twice). |
PAYMENTS_NOT_INITIALIZED | The payment system is not yet ready. Wait for payments.onReady(). |
What changed in v8.0
SDK v8.0 introduces Zero Permissions support with two key changes:
- New module:
FBInstant.overlayViews— A complete API for creating and managing overlay view iframes. Overlay views let you display player names, photos, and other profile information within your game UI while keeping that data under Meta’s control. See Overlay View Components for the XML syntax. - Removed APIs:
FBInstant.player.getName()andFBInstant.player.getPhoto()— Direct access to player names and profile pictures has been removed to align with the Zero Permissions privacy model. Use overlay views to display this information instead.
If you are migrating from an earlier SDK version, update your code to replace any calls to
getName() or getPhoto() with overlay views. See Social Features for implementation patterns.
Social connections