The Web Games on Facebook and Facebook Gameroom platforms are no longer available for new submissions. This documentation is intended solely for developers with existing games. To learn more, read our blog post.
Per section 1.7 of Facebook Platform Policy, to minimize the risk of confusing information, only pre-approved games related to coronavirus (COVID-19) are allowed.
Building games on Facebook typically involves developing web games using either web technology such as Flash or HTML 5, or developing cross-platform games using game engines like Unity or Cocos2d. Whichever technology you choose for developing your game, there are some best practices that you can follow to optimize the experience for players of your game on Facebook.com.
This document covers best practices across the following areas:
If you've never built a game for Facebook, you can start with this guide to Games on Facebook, which will walk you through the basics of setting up and configuring your web game on Facebook.
FB.getLoginStatus method, and if necessary to request authorization using the
Remember that, until the callback you passed to
FB.getLoginStatus has fired, you can't make calls to methods that require an access token to be available (such as
FB.api), so be sure to put those calls either in the callback or in code that runs only after the callback is complete.
Commonly for games on Facebook, a login dialog is the first thing a new player sees, and this is a common cause of drop-off in players. Optimizing the performance of the login dialog is crucial, as it will directly affect the number of players you acquire.
By using the SDK for client-side login, you can control when the player sees the login dialog as part of the game load sequence, as well as optimising the experience when a player chooses not to log into your game.
To implement this change, instead of using a redirect, render a splash page calling
FB.login() automatically once the FB SDK is initialized.
Read more: Login for Games on Facebook
If a player doesn't grant a requested permission on login, or you're asking for more permissions than when they last logged in, ask for them again in a way that helps them understand why they should grant them to your game.
For example, in Friend Smash, the game needs access to the
user_friends permission in order to show one of the player's friends as a 'smash' challenger. This permission requires that your game goes through app review and that it asks the player for the permission. If the player hasn't granted
user_friends, the game gently reminds them that their experience will be better if they grant the permission. This gives players better context on the permission request and allows them to grant it when better informed about its benefit.
Read more: Facebook Login Best Practices
If your game exists on mobile platforms as well as on Facebook, make sure to use the same Facebook App ID on each platform. When a player grants permissions to your app on one platform, they won’t have to grant any extra permissions to play that app on other platforms.
When a player logs in to a game using their Facebook account, they often expect that their game state is maintained when they log in next time. If it makes sense to provide a continuous experience in your game, you can use Facebook data to assist in providing this experience.
Data from game developers shows that players who play the same game on both web and mobile are consistently more highly engaged than players who play on a single device.
By logging in with Facebook, your players are providing you with a consistent ID that you can then use to persist their experience for future game sessions. Further, this ID is consistent across mobile and web, so you can use this to synchronize their experience across platforms.
When a player grants permissions to your game, you can get information about the player and their friends who play your game, and use that to provide a social context within the game, which helps players feel more engaged.
Some apps do this by providing a friends’ progress bar UI in the game. Others display a scoreboard positioning the player amongst their friends.
By looking at Facebook Analytics for your game, you get detailed demographic information about your players and their locales. Keep an eye on this information regularly, and make sure that your game's content is localized for the most prominent locales.
As players make progress in your game, they'll often want to share this progress with their friends. When designing your game, make sure to define moments in the gameplay that will encourage sharing. These moments might be a new high score, a level completion, or unlocking new inventory items.
Ensure that players can share these moments easily when they occur, by presenting a share button along with the announcement in-game. The more interesting these sharable moments are, the more likely they are to attract new players from your players' friends.
To make sure that stories are shared at the right moment in the game, make sure to use a clear and concise button. For example, the button should clearly state "Share" and draw the player's attention to it, e.g. by highlighting it in green. This ensures that a player is invoking the flow with a clear intent to share something and is therefore more likely to complete the flow.
When players choose to share their content your game gets a chance to grow its audience organically. Shared content is often the first thing that a players’ friends see from your game.
Make sure that your content is enticing in the context of a player’s friend who has never seen your game before. If you have rich in-game characters, be sure to add these to your images, and don’t reuse images for multiple objects.
Track the success of your shared content with Facebook Analytics. You can view the reach of particular stories, understand the demographics of who is sharing and engaging with your content and optimize future efforts based on this understanding. This data is available online and through an API for developers.
In order to track the performance of different types of stories, you can append an additional
refparameter when publishing. You will then be able to track the performance of each type of story separately in Facebook Analytics.
Click Through Rates The CTR for your stories is one of the key indicators of engagement which in turn affects distribution of your stories. It is an important data point to monitor, particularly as you make changes to the content you are publishing, or the frequency at which you are publishing data. You can find this on the Story Click-through Rate graph in Facebook Analytics. This can also be filtered to show only a particular type of action or object.
Engagement Similar to CTR, Likes and Comments on your stories are another important indicator of engagement, contributing to the distribution your stories receive. You should monitor these to see which get the best engagement in terms of Likes and Comments to understand what content your players like to engage with.
Invites and requests sent by your players to their friends are an important acquisition and retention channel. Make sure that it’s easy for players to invite their non-playing friends to play the game, and to request assistance or items from playing friends in order to keep them engaged.
Many games do this by adding a friend bar to provide social context along with a consistent request / invite interface. Other games prompt players to invite their friends to help when they run low on lives or resources. Choose an approach which best suits your game.
You can use App Notifications to alert groups of players or individual players about events inside your game that require their attention. For example, App Notifications could be used to warn a player that their base is under attack, or inform them that a new item or level pack is available in the game.
While this is a powerful re-engagement channel, it requires careful use in order to keep from being spam-throttled. Facebook enforces a minimum threshold for clicks on notifications sent, and if your game drops below this threshold, you will be unable to send further notifications. This threshold can be seen in in the App Notifications tab in Facebook Analytics for your app.
To avoid dropping below the threshold, start by sending notifications to your most engaged players only, and send a small number of notifications at first to measure the clickthrough rate. Use player locale information to send notifications to players during their most engaged hours. Once your clickthrough rate is maintained above threshold, you can start to expand your audience.
The price of your items in your in-game store plays a big part in converting players to payers, so make sure to choose price points that are sensible and appealing to players.
When showing multiple package prices, make sure to highlight the best-value item, and show players the saving they make by choosing this item.
With Local Currency Payments, it’s possible to do granular localized pricing. Use demographic targeting to localize prices for your most popular regions.
By supporting pricing in local currency, you can simplify the purchase experience, giving you more flexibility, and giving your players a way to make purchases in games using their local currency.
You can find in-depth documentation here:
Run sale events to help convert players into payers. These work well when linked to seasonal holidays. You can also run extra value weekends where in-game currency goes further than usual, enticing players to purchase and spend in-game currency in larger amounts.
Rewarding players for logging in on consecutive days is a great way to increase retention but also helps monetization as players get a sense of the benefit of having more coins/currency within the game.