Skip to main content
Version: Next

Taro.showShareMenu(option)

Displays the Forward button on the current page.

Reference

Type

(option: Option) => Promise<CallbackResult>

Parameters

Option

PropertyTypeRequiredDescription
withShareTicketbooleanNoIndicates whether to forward with shareTicket.Detail
showShareItemsstring[]No(Only for QQ) QQ Mini-Program sharing function, support sharing to QQ, Qzone, WeChat friends, WeChat friends circle.
- ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
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

API Support

APIWeChat Mini-ProgramQQ Mini-ProgramH5React Native
Option.showShareItems✔️

Sample Code

Taro.showShareMenu({
withShareTicket: true
})

API Support

APIWeChat Mini-ProgramH5React Native
Taro.showShareMenu✔️