AlipayJSBridge.call("qicardShareAppMessage", ...) shares a Miniapp message. You configure the share content (title/description/path/image) and receive the share result in the success callback.
Supported types of mini programs: H5+
AlipayJSBridge.call("qicardShareAppMessage", {
title: "Demo Share Title",
desc: "Shared from Super Qi miniapp. Tap to open!",
path: "share.html",
success: (res) => {
console.log("[from mini app], share call succeeded: ", JSON.stringify(res));
my.alert({ content: "success" + JSON.stringify(res) });
},
fail: (res) => {
console.log("[from mini app], share call fail: ", JSON.stringify(res));
my.alert({ content: "fail" + JSON.stringify(res) });
},
});
| Property | Type | Required | Description |
|---|---|---|---|
title | String | Yes | share title |
desc | String | No | share desc |
path | String | No | share path |
imageUrl | String | No | share imageUrl |
The incoming parameter is an Object with the following attributes:
| Property | Type | Description |
|---|---|---|
shareResult | Boolean | The result that indicates whether if the sharing is successful. |
The incoming parameter is an Object that contains error information (the exact fields may vary by runtime/version).
title is required; provide enough context so users know what they will open after sharing.path and imageUrl are optional, but recommended to improve click-through.AlipayJSBridge is available.