Best Practices for Games On Facebook

Overview

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 engine 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.

This document covers best practices across the following areas:

  1. Facebook Login
  2. Sharing
  3. Game Requests & Notifications
  4. Monetization

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.

Facebook Login

Streamline your login implementation

Players who come to your game on Facebook are guaranteed to be logged into Facebook. However, you'll need to ask players to grant permissions to your game before you can use any of their information, or even know who they are. While there are a number of ways to do this, the preferred option is to use the Facebook SDK for JavaScript to check for authorization using the FB.getLoginStatus method, and if necessary to request authorization using the FB.loginmethod.

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.

Read more:

Switch To Javascript Login Flow

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.

In Login Flow without Facebook SDK for JavaScript, if a player clicks the cancel button, they will be returned to the App Center page showing similar apps. In the Javascript Login Flow, the cancel button instead leaves the player in your game, meaning you can either shown them a preview of the game, or display a page explaining why you are asking them to login. It gives players more chances to open the login dialog again to players who clicked the cancel button.

Login Flow with Javascript gives players chances to see a splash page promoting your game and to open the login dialog again.

Magic Kitchen, which shows some gameplay assets behind the login dialog

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

Provide context when re-asking for permissions

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.

Friend Smash! explaining why the game is better with friends

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. 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

Use the same app ID on mobile and facebook.com

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.

Provide a continuous experience

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.

Display prominent social context

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.

The friend bar in Dragon City

Prioritize your localizations using Facebook Analytics

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.

Detailed demographic and locale information for your players is available within Facebook Analytics

Sharing

Define Shareable Moments

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.

Create moments in your game where your players will want to share.

Build your own custom share dialog

Sharing stories via the Graph API enables you to build your own custom share dialog which fits into the look and feel of your game. Building your own custom share dialog also means that no extra steps are required by the player to share stories and you also avoid interrupting a fullscreen session as there is no need to open a Facebook dialog.

Hit It Rich! Casino Slots offers a custom share dialog with a message field

When using the APIs for sharing stories, it is also important to give players the opportunity to add their own custom message to the story, as stories which have a custom message attached usually achieve better engagement. This step should always be optional and players need to be able to continue the game without being forced to share a story.

Read more: Clarification of Platform policy on prefill

Make sure your sharing flow is policy-compliant

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.

Read more: Facebook Platform Policy, section 2: Give people control

Offer multiple ways to share

With the Share Dialog on Android, iOS and on Facebook, you can provide an alternative two-step sharing mechanism to players who don't grant write permissions to your game. When a player reaches a moment that they want to share, you can check the permissions they've granted, and if publish_actions hasn't been granted, show them a button that launches a share dialog.

If a player has never granted publish_actions permissions it is recommended to attempt to upsell this at a later stage in the game. It is important, however to limit the amount of attempts and respect the player's decision not to grant the permission after all. A good scenario to upsell would be for example after a player has shown intent of sharing a story, e.g. by clicking on a "Share" button after completing a level.

The Native Share Dialog for iOS & Android supports both Open Graph stories and link-based feed posts.

Show engaging content

When a player chooses to share their content, this gives your game a chance to gain new audiences. 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’s never seen your game before. If you have rich in-game characters, be sure to add these to your images, and don’t reuse imagery for multiple objects.

Criminal Case uses distinctive character images when sharing content from the game.

Measure Sharing with Facebook Analytics

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.

Understand your sharing in detail with Facebook Analytics.

Using the ref parameter 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.

Game Requests & Notifications

Make invites and requests easy

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.

Asking for lives via requests in Candy Crush Saga

Build a custom multi-friend selector

When players send requests & invites, they’ll usually want to target these to specific people. Facebook provides a simple dialog that allows players to filter and select the specific friends they want to target, but you can create your own custom filters based on sets of friend UIDs to help players select subsets of their friends quickly and efficiently. Those filters can be based on in-game context, for example friends who played recently, or friends who’ve reached a certain level.

You may find it preferable to build your own custom multi friend selector that matches the look & feel of your game. In this case, you should always have provide players with the ability to search for friends by name, or by filters. Finally, to ensure policy compliance, you should never force players to select all friends when using a multi friend selector.

Use App-to-User notifications efficiently

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.

App Notifications from War Of Mercenaries and Criminal Case

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.

App Notifications click-through Rate graph in Facebook Analytics

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.

Monetization

Optimize your store

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.

Price points in Criminal Case

Localize pricing

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:

Sales & Events

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.

Payer Promotions

Payer Promotions help you get players to pay more in your game. Facebook sponsors this feature, enabling you to offer certain people a discount on your game's virtual currency, such as $3 of value for free.

Offer Daily Rewards

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.

Daily rewards in Slots Craze