Skip to main content

shareFB

Supported Version

zpa
Only supported in Zalopay App

Description

Open a dialog to share information to Facebook

Parameters

ParamData typeRequiredDescription
urlstringYesUrl to the content to share
hashtagstringNoHashtag attached to shared content
quotestringNoContent needs to be shared

Return Value

N/A

Error Code

Error CodeDescription
041201Cannot find current webview
041202Share Facebook failed
041203User cancels sharing to Facebook
041204Cannot open Facebook share dialog

Sample Code and Sample Return Data

Sample Request:

window.zlpSdk.UI
.shareFB({ url: "https://link.facebook.example.com" })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));

Sample Response:

{ data: {}, status: "success" }