If you can't see "Instant Games" in the list when selecting "Add Product" to your application, make sure that your app is in the "Games" category. The "Instant Games" product will not show up for apps outside of this category.
We don't impose hard limits on game size. But we do recommend that the initial download size not exceed 5 seconds. You can host up game bundles of up until 200MB but you should only download absolutely necessary files in the initial load. For more information please refer to our Best Practices section
FBInstant.context.shareAsync() method contains an
intent parameter that accepts values like
'SHARE', etc. Currently, as of version 4.0, this parameter does not serve a specific purpose. It was added to future-proof the SDK and its will provide user-facing changes in the future, but for the moment, it only provides semantic value.
This is currently not possible. When you are challenging another player in the thread for the first time, there's no SDK method to retrieve information about the person being challenged. We recommend to use a placeholder name like "opponent" until the second player responds to the invite, when you'll be able to access their information via
When it comes to deciding where to store your information, there are two options:
EventSource. This will mean more flexibility but will also incur hosting costs that are proportional to your game's audience.
To restrict the access to your game to a custom list of countries:
During submission for Instant Game app review, you must provide an Apple Developer team ID in accordance with Apple's App Store Review Guidelines 4.7. This enables distribution of your game on iOS. Using an invalid or expired Developer team ID may lead to your game being removed.
You should make sure to call window.innerWidth and window.innerHeight after FBInstant.startGameAsync() resolves.
The most common cause for a bot not receiving webhooks is misconfiguration in the app. Please visit our Bot Setup section for a full guide on how to setup your game bot. Check your developer dashboard for the following:
messaging_game_playsevents in the Messenger section of the developer dashboard
If you're getting errors as response to the Graph API send calls, it means that one of the following situations is happening:
For more information please refer to the Send API documentation
If you're following either of our [Quickstart] or our [Test, Publish, Share] guides you must be familiar with our concept of the Embedded player. It's a way for you to test your Instant Game running from a local HTTP service in your computer, linked to all live functions of the Instant Games SDK.
Sometimes when you try this approach, your game can be stuck in the loading. Sometimes no message will be displayed in the browser's developer console, and some other times a message will be displayed saying
Failed to execute 'postMessage' on 'DOMWindow'. These are both manifestations of the same type of error, most commonly caused by your local server is refusing to serve assets because of a certificate issue.
If that's the case, navigate to the root of your local server (usually
https://127.0.0.1:8000) and follow your browser's instructions in accepting certificates, or adding a security exception for this website. Once you've done that, go back to the Embedded player URL and everything should be working.
This error happens when you are trying to load an ad from an AdInstance which has failed in the past. If your AdInstance's
loadAsync method has rejected once already, don't try to reuse it. Instead, request a new AdInstance by calling