Game Play Button Reference

The game play button launches an Instant Game that is associated with the bot page.

For more information on using the game play button, see Game Play Button.

Contents

Example

{
    "type":"game_play",
    "title":"Play",
    "payload":"{<SERIALIZED_JSON_PAYLOAD>}",
    "game_metadata": { // Only one of the below
      "player_id": "<PLAYER_ID>",
      "context_id": "<CONTEXT_ID>"
    }
  }

Example Response

{
  "recipient_id": "1254477777772919",
  "message_id": "mid.$cAAJsujCd2ORj_1qmrFdzhVa-4cvO"
}  

Properties

Property Type Description

type

String

Type of button. Must be game_play.

title

String

Button title, e.g. "Play".

payload

String

Optional. This data will be sent to the game.

game_metadata

Object

Optional. Parameters specific to Instant Games.

game_metadata

By providing the optional game_metadata, you can trigger the game to be started against a specific player_id or in a specific context_id.

Property Type Description

player_id

String

Optional. Player ID (Instant Game name-space) to play against.

context_id

String

Optional. Context ID (Instant Game name-space) of the THREAD to play in

Refer to Game Play webhook event for the event that will be sent to the bot when a user finishes a game round.