messaging_game_plays
Webhook Event ReferenceThis callback occurs after a person played a round of Instant Games. To receive this event, you must subscribe to this callback by selecting the messaging_game_plays
field when setting up your webhook.
{
"sender": {
"id": "PSID"
},
"recipient": {
"id": "PAGE_ID"
},
"timestamp": 1469111400000,
"game_play": {
"game_id": "GAME-APP-ID",
"player_id": "PLAYER-ID",
"locale": "PLAYER-LOCALE",
"context_type": "CONTEXT-TYPE:SOLO",
"context_id": "CONTEXT-ID", # If a Messenger Thread context
"score": SCORE-NUM, # If a classic score based game
"payload": "PAYLOAD" # If a rich game
}
}
属性 | 类型 | 描述 |
---|---|---|
| 字符串 | 触发 Webhook 事件的用户 PSID。 |
| 字符串 | 触发 Webhook 事件的用户 user_ref。此属性仅适用于聊天插件的 Webhook 事件。 |
属性 | 类型 | 描述 |
---|---|---|
| 字符串 | 您的主页编号。 |
game_play Field
| Description |
---|---|
| The ID for the social context type if the type is not |
| The social context of the game; |
| The Meta app ID for the game |
| The locale for the player |
| The JSON encoded object, set using |
| The ID for the player in the Instant Game namespace. |
| The best score achieved by this playing during this round of game play. Only available to Classic score based games. |