displaySharingPage
displaySharingPage(
client,params,placement?):Promise<DisplaySharingPageResultType>
Defined in: actions/displaySharingPage.ts:38
Function used to display a sharing page
Parameters
Section titled “Parameters”client
Section titled “client”The current Frak Client
params
Section titled “params”The parameters to customize the sharing page (products, link override, metadata)
placement?
Section titled “placement?”string
Optional placement ID to associate with this display request
Returns
Section titled “Returns”Promise<DisplaySharingPageResultType>
The result indicating the user’s action (shared, copied, or dismissed)
Description
Section titled “Description”This function will display a full-page sharing UI to the user, showing product info, estimated rewards, sharing steps, FAQ, and share/copy buttons. The sharing link is generated from the user’s wallet context + merchant info.
Remarks
Section titled “Remarks”- The promise resolves on the first user action (share or copy) but the page stays visible
- The user can continue to share/copy multiple times after the initial resolution
- Dismissing the page after a share/copy action is a no-op (promise already resolved)
- If the user dismisses without any action, the promise resolves with
{ action: "dismissed" }
Example
Section titled “Example”const result = await displaySharingPage(frakClient, { products: [ { title: "Babies camel cuir velours bout carré", imageUrl: "https://example.com/product.jpg", }, ],});
console.log("User action:", result.action); // "shared" | "copied" | "dismissed"