Interface: SharePayload
Payload for context.shareAsync. Defines the message to be sent to the context.
Table of contents
Properties
- cta
- data
- description
- filters
- hoursSinceInvitation
- image
- intent
- minShare
- playerIds
- shareDestination
- switchContext
- text
- ui
Properties
cta
• Optional cta: string | LocalizableContent
Text of the call-to-action button.
data
• Optional data: Record<string, unknown>
Object passed to any session launched from this context message.
Its size must be <=1000 chars when stringified.
It can be accessed from Wortal.session.getEntryPointData().
description
• Optional description: string | LocalizableContent
Optional customizable text field in the share UI. This can be used to describe the incentive a user can get from sharing.
filters
• Optional filters: [ContextFilter]
An array of filters to be applied to the friend list. Only the first filter is currently used.
hoursSinceInvitation
• Optional hoursSinceInvitation: number
Specify how long a friend should be filtered out after the current player sends them a message.
This parameter only applies when NEW_INVITATIONS_ONLY filter is used.
When not specified, it will filter out any friend who has been sent a message.
PLATFORM NOTE: Viber only.
image
• image: string
Data URL of base64 encoded image to be displayed. This is required for the payload to be sent.
intent
• Optional intent: "INVITE" | "REQUEST" | "CHALLENGE" | "SHARE"
Message format to be used. There's no visible difference among the available options.
minShare
• Optional minShare: number
Defines the minimum number of players to be selected to start sharing.
playerIds
• Optional playerIds: string[]
Optional property to directly send share messages to multiple players with a confirmation prompt. Selection UI will be skipped if this property is set.
PLATFORM NOTE: Viber only.
shareDestination
• Optional shareDestination: ShareDestination[]
An optional array to set sharing destinations in the share dialog. If not specified all available sharing destinations will be displayed.
PLATFORM NOTE: Facebook only.
switchContext
• Optional switchContext: boolean
A flag indicating whether to switch the user into the new context created on sharing.
PLATFORM NOTE: Facebook only.
text
• text: string | LocalizableContent
A text message, or an object with the default text as the value of 'default' and another object mapping locale keys to translations as the value of 'localizations'.
ui
• Optional ui: "DEFAULT" | "MULTIPLE"
Optional property to switch share UI mode.
- DEFAULT: Serial contact card with share and skip button.
- MULTIPLE: Selectable contact list.