openShareDialog
Supported Version
zpa
Only supported in Zalopay AppDescription
Open a dialog to share some information from Zalopay App to other applications
Parameters
| Param | Data type | Required | Description |
|---|---|---|---|
| type | number | Yes | You can choose one of the following two options:
|
| caption | string | No | Title of the content to share |
| content | string | No | Content needs to be shared |
| link | string | Yes | Url to the content to share |
Return Value
N/A
Error Code
| Error Code | Description |
|---|---|
| 040501 | Cannot find current webview |
| 040502 | User closes the sharing dialog |
| 040503 | Sharing content failed |
| 040504 | Screenshot failed |
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.UI
.openShareDialog({ type: 1, link: "https://link.example.com"})
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{ data: {}, status: "success" }