Skip to main content
Version: Next

Taro.updateShareMenu(option)

Updates the forwarding properties.

Reference

Type

(option: Option) => Promise<CallbackResult>

Parameters

Option

PropertyTypeRequiredDescription
activityIdstringNoThe activityId of an updatable message, which is obtained via updatableMessage.createActivityId API
isUpdatableMessagebooleanNoIndicates whether it is an updatable message. For details, seeUpdatable Message
templateInfoUpdatableMessageFrontEndTemplateInfoNoTemplate information for updatable messages
withShareTicketbooleanNoIndicates whether to forward with shareTicket.Detail
complete(res: any) => voidNoThe callback function used when the API call completed (always executed whether the call succeeds or fails)
fail(res: any) => voidNoThe callback function for a failed API call
success(res: Result) => voidNoThe callback function for a successful API call

UpdatableMessageFrontEndTemplateInfo

object.templateInfo is composed as follows

PropertyTypeDescription
parameterListUpdatableMessageFrontEndParameter[]Parameter list

UpdatableMessageFrontEndParameter

Parameter list

PropertyTypeDescription
namestringParameter name
valuestringParameter value

Sample Code

Taro.updateShareMenu({
withShareTicket: true,
success () { }
})

API Support

APIWeChat Mini-ProgramH5React Native
Taro.updateShareMenu✔️