Skip to main content

openShareDialog

Supported Version

zpa
Only supported in Zalopay App

Description

Open a dialog to share some information from Zalopay App to other applications

Parameters

ParamData typeRequiredDescription
typenumberYesYou can choose one of the following two options:
  • 1: Share content with screenshots
  • 2: Share content without screenshots
captionstringNoTitle of the content to share
contentstringNoContent needs to be shared
linkstringYesUrl to the content to share

Return Value

N/A

Error Code

Error CodeDescription
040501Cannot find current webview
040502User closes the sharing dialog
040503Sharing content failed
040504Screenshot 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" }