Notifications is a common lever for acquisition, engagement and retention that we continue to support with Zero Permissions.
Note that the graph API POST endpoint supported for ZP games is functionally identical to the existing App to User Notifications graph API POST endpoint, except for two key differences: usage of App Access token (instead of user access token) and player ID (instead of App Scoped User ID).
To send notifications for Zero Permissions games, there are two main mediums
Sending an A2U notification to a player can send notifications through the following channels: Messenger bot message, Facebook Jewel, and Facebook Gaming Tab. A messenger bot message will only be sent if your game has a Game Bot configured and the recipient player is subscribed to bot messages from your game. Otherwise, notifications will be sent through the other channels.
Below are examples of how the notifications sent through different delivery channels look like along with what game platforms each channel is available for. These were sent with the following message values:
"message": {
"title": "Notification Title",
"body": "This is the unified flow body",
"media_url": "https://picsum.photos/300/300"
}
| Notification Channel | Example |
|---|---|
Bot Message | |
Jewel | |
Gaming Tab |
Note: Facebook automatically performs filtering on Jewel and Gaming Tab notifications sent so that recipients are not spammed by too many notifications. This means that not all Jewel and Gaming Tab notifications will reach the intended recipient. When developing, it is recommended that you test these notifications on a new test account as these accounts have less incoming notifications so it is more likely that notifications will reach them. Bot messages will always send to the recipient if they are subscribed.
The following APIs are available through the Gaming Domain Graph API graph.fb.gg. Note the following:
access_token provided as a query parameter. For security, an app access token should only be acquired and used on your game servers. For more information, refer to our developer documentation.Notifications can be sent to a recipient either immediately or scheduled for a future time using the following API.
POST graph.fb.gg/{app_id}/notifications| Body Parameter | Description |
|---|---|
| Player ID that refers to a specific user. |
| Content of the message. JSON object of the format: Please note that media_url is required for bot message if bot_message_payload_elements is null. Otherwise this will automatically be sent through other channels instead. |
| Label to group similar notification types together and can be used with the cancellation notification API defined below. |
| Custom payload that is attached to the game URL and can be read when the user enters your game through the notification. Must be provided in JSON format. |
| Time from now (in seconds) to send the notification. Must be between 300 (5 minutes) and 2592000 (30 days). Limit of 5 pending scheduled notifications per recipient. |
| Optional parameter to send more advanced bot message XMAs. If specified, this will be used when sending bot messages, instead of the standard XMA created with just the message title and body. Follows message.attachment.payload.elements as defined in the public documentation here. Take the entire elements object described in the documentation and provide it under this field. |
All notifications scheduled for a recipient can be canceled using the following API. An optional label field can be provided to only cancel all notifications with that label for the recipient instead.
POST graph.fb.gg/{app_id}/notifications_cancel_all| Body Parameter | Description |
|---|---|
| Player ID that refers to a specific user. |
| If provided, will only cancel notifications with this label for the recipient |