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:
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.
The game page overlay feature is implemented through the following APIs.
Determines whether the game page overlay feature is available based on the current user, platform, and app.
FBInstant.community.canFollowOfficialPageAsync(): Promise<boolean>
Renders a game page overlay on top of the Instant Game.
FBInstant.community.followOfficialPageAsync(): Promise<void>
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.
The game group overlay feature is implemented through the following APIs.
Determines whether the game group overlay feature is available based on the current user, platform, and app.
FBInstant.community.canJoinOfficialGroupAsync(): Promise<boolean>
Renders a game group overlay on top of the Instant Game.
FBInstant.community.joinOfficialGroupAsync(): Promise<void>