Handle external navigation and URL interactions safely across clients
<a href="">
, <Link href="">
) or static URLs in your Mini App. These approaches don’t work consistently across different clients and can create poor user experiences.sdk.actions.openUrl()
to safely open external websites in the client’s in-app browser:
sdk.actions.composeCast()
instead of composer intent URLs:
Current Implementation | Recommended SDK Action |
---|---|
<a href="https://external.com"> | sdk.actions.openUrl('https://external.com') |
window.open('https://farcaster.com/~/compose?text=...') | sdk.actions.composeCast({ text: '...', embeds: [...] }) |
Farcaster-specific deeplinks | Use appropriate SDK action |
Direct profile links | Use SDK actions for profile navigation when available |