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.
By adding sharing in your game, your players can share their game activity to their profile and into their friends' Feeds. This one-to-many communication channel is a powerful driver of player acquisition and engagement. As all shared stories are published directly to a player's profile, it is important to build a high quality and intuitive sharing flow into your game. This guide will help you determine the sharing approach that works best for your game.
Games can use the following approaches to share stories:
Sharing can be implemented by making use of the Share Dialog, which is available on web, iOS and Android, allows people to share content using a consistent UI that matches that of Facebook. You also don't need to implement Facebook Login to use the Share Dialog, which makes it simpler for developers.
Mobile games can make use of the sharing functionality built into iOS and Android, which provide ways to share to Facebook without complicated developer integration. However, these forms of sharing don't have any association to your app, so the value of this type of share is limited.
By using the share dialogs provided by the Facebook SDKs on iOS and Android, you can share stories that are attributed to your game. This provides additional benefits, including driving traffic to your game from the attribution label on stories.
Link shares are the simplest way to get content from your game into Feed. By sharing a link, you can control the appearance of your game's content when it appears on Facebook, as well as the behaviour when people click on that content.
To share content via a link share, you need to create links that are available at public URLs, and can be shared via one of our dialogs or via APIs. You can create representations of common objects on your game, such as levels, bosses, collectable items, or you can generate links that are unique to the player sharing, such as their island, farm etc.
To ensure that your links look good in Feed, you can optimize them using Open Graph (OG) metadata. With OG metadata, you can define a primary image, a title and a description, and these will be used by Facebook when rendering your links in Feed.
If you supply large-format images, Facebook will render them as large as possible in Feed. To make use of this format, your images must be at least 1200px wide, and with a ratio of at least 1.91:1.
Read the full guide to optimizing your web content in the Sharing for Webmasters guide.
The destination of your shared links is crucial to making the most of sharing as a re-engagement and retention channel. Driving players back to your game quickly is the best way to grow your player base. The common behaviour depends on platform.
When people engage with the Feed stories posted from your app, those stories can send people to your app or your app's App Store page, driving traffic and app installs. You can control this behavior using App Links, allowing you to provide specific destination for each platform. This feature is available on all devices, including iOS and Android.
As an alternative to sharing self-hosted content via links, you can also share media content directly to Facebook using dialogs. Sharing content directly to Facebook carries some additional benefits; content will be shown full-size in Feed, and video content will auto-play on both Desktop and Mobile. However, since the photo / video experience is optimized for viewing content, these kinds of stories drive fewer players directly to your game, so they work best for surfacing interesting content to players.
If you prefer to use link shares, you can add Open Graph video tags to the metadata on your links, and Facebook will show the video content in Feed. You can define HTML 5 compatible video files, or a custom SWF player. Since this video content is loaded in from your URL during play, Facebook will not autoplay this content.
Read more: Video Content Types
The Share Dialogs, available on iOS, Android and web, are the easiest ways to get content from your game onto Facebook. By using the Facebook SDK for your supported platforms, you can share links, media and Open Graph stories directly from your game.
Sharing via the Share Dialog requires your players to tap an explicit Share button. For games on Facebook, the Share Dialog appears as an overlay on top of your game. For mobile games on iOS and Android, the Dialog appears on top of your game, and supports both landscape and portrait modes.
Whichever sharing approach you take for your game, there are some best practices to help you build an optimal sharing experience.
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.
Read more: Facebook Platform Policy, section 2: Give people control
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.