Sharable link on user create images

Hi, team!
We can generate a great shareable link with an OG preview that leads to a nice page with useful information, for example: https://shop.app/mc/nAssIQbo3cKG. Thank you for that!

However, if the recipient has the Shop app installed, the link opens directly in the mini instead of the web page.

Is there a way to display the same content inside the mini?

You can get public_id from the deeplink query params via useDeeplink (docs) then use <ImageContentWrapper /> (docs) to display the content. You will have to mock this for dev mode because of a bug we are aware of (internal id #88952)

Thank you @steve-t-shopify!

Am I correct in understanding that when a link is passed to the app, the WebView will add query parameters? The link itself looks like this: https://shop.app/mc/b5aTBE8c386h, without any query parameters.

Yes deeplinks are transformed and you should see a public_id when using useDeeplink - we might change this in future as it’s not exactly how we want it and it’s undocumented but you can rely on it for now

1 Like

@steve-t-shopify Is it correct search param for dev debbuging ? http://localhost:9001/?public_id=BzZXkkxvEUqp (seted up with useEffect(() => {
const url = new URL(window.location.href)
url.searchParams.set(‘public_id’, ‘BzZXkkxvEUqp’)
window.history.replaceState(null, ‘’, url.toString())
}, ))

I recive empty object in console for queryParams from useDeeplink()

Yes this is why I say to mock it - our dev mode deeplinks have a bug with this public_id. Hardcode it for now to test locally then replace with useDeeplink to make a submission - once your mini is in testing mode we can try it for real

Hi! Is there an option to clear the value or remove public_id in the navigating through pages? My logic is redirecting from the start page to the custom route to display the image if public_id exists, but when I navigate to the start page again, the app redirects me back to the route to display the image again.