Community Overlays for Instant Games

Community overlays encourage players to navigate to your Instant Game's official Facebook pages and groups from within the game.

This feature is available only to approved partners.

The following community overlays are available:

Game Page Overlay

The game page overlay renders a card over your Instant Game that displays a preview of your game's official Facebook page.

The overlay shows the page's profile picture, number of likes, and top pinned post. When the user selects Follow the overlay asks for confirmation and then navigates out of the game and into the game's Facebook page.

Figure 1. A game page community overlay.

Game Page Overlay APIs

The game page overlay feature is implemented through the following APIs.

canFollowOfficialPageAsync( )

Determines whether the game page overlay feature is available based on the current user, platform, and app.

FBInstant.community.canFollowOfficialPageAsync(): Promise<boolean>

followOfficialPageAsync( )

Renders a game page overlay on top of the Instant Game.

FBInstant.community.followOfficialPageAsync(): Promise<void>

Game Group Overlay

The game group overlay renders cards over your Instant Game that display previews of your game's official Facebook groups. The user can scroll horizontally through the groups.

Each card shows information about a single Facebook group, including cover art, name, privacy setting, number of members, and a list of the user's friends that are members of the group. When the user selects View Group the overlay asks for confirmation and then navigates out of the game and into the selected Facebook group.

Figure 2. A game group community overlay.

Game Group Overlay APIs

The game group overlay feature is implemented through the following APIs.

canJoinOfficialGroupAsync( )

Determines whether the game group overlay feature is available based on the current user, platform, and app.

FBInstant.community.canJoinOfficialGroupAsync(): Promise<boolean>

joinOfficialGroupAsync( )

Renders a game group overlay on top of the Instant Game.

FBInstant.community.joinOfficialGroupAsync(): Promise<void>