Interface: UpdatePayload

context.UpdatePayload

Represents content to be shared with a context update.

Properties

action

action: "CUSTOM"

For custom updates, this should be CUSTOM.


cta

Optional cta: string

Optional call-to-action button text. By default Facebook will use a localized ‘Play’ as the button text.


data

Optional data: any

A blob of data to attach to the update. All game sessions launched from the update will be able to access this blob via client’s getEntryPointData(). Must be less than or equal to 1000 characters when stringified.


image

image: string

Data URL of a base64 encoded image.


notification

Optional notification: "NO_PUSH" | "PUSH"

Specifies notification setting for the custom update. This can be NO_PUSH or PUSH, and defaults to NO_PUSH. Use push notification only for updates that are high-signal and immediately actionable for the recipients. Also note that push notification is not always guaranteed, depending on user setting and platform policies.


strategy

Optional strategy: "IMMEDIATE" | "LAST"

Specifies how the update should be delivered. This can be one of the following:

  • IMMEDIATE - The update should be posted immediately.
  • LAST - The update should be posted when the game session ends. The most recent update sent using the LAST strategy will be the one sent. IMMEDIATE_CLEAR - The update is posted immediately, and clears any other pending updates (such as those sent with the LAST strategy).
  • If no strategy is specified the default will be IMMEDIATE.

template

template: string

ID of the template this custom update is using. Templates should be predefined in fbapp-config.json. See the Bundle Config documentation for documentation about fbapp-config.json.


text

text: string

Text for the update.