Headless API
SDK reference
hydrogen
lib
facebook-ref-link

lib/facebook-ref-link

Interfaces

FacebookRefLink

Properties

link
link: string;

The link to actually send the shopper to — device-appropriate.

mobileLink
mobileLink: string;
webLink
webLink: string;

FacebookRefLinkParams

Everything generateFacebookRefLink needs to sign a ref payload.

Properties

customerId
customerId: string;

Joy customer id; the ONLY identity the webhook links on.

pageId
pageId: string;

The shop's connected Facebook Page id (blob.facebookPageId).

shopDomain?
shopDomain?: string;
shopId
shopId: string;

Doubles as the HMAC key — see the file header.

shopifyCustomerId?
shopifyCustomerId?: string;

Functions

generateFacebookRefLink()

function generateFacebookRefLink(__namedParameters): Promise<FacebookRefLink>;

Build the Messenger deep link that carries this customer's signed ref. Desktop gets the web messenger, mobile the m.me universal link, the same links the Liquid storefront widget builds.

Parameters

ParameterType
__namedParametersFacebookRefLinkParams

Returns

Promise<FacebookRefLink>