Enable native share flows and social navigation
import { useComposeCast } from '@coinbase/onchainkit/minikit'; export default function ComposeCastButton() { const { composeCast } = useComposeCast(); const handleCompose = () => { composeCast({ text: 'Just minted an awesome NFT using @coinbase OnchainKit!' }); }; const handleComposeWithEmbed = () => { composeCast({ text: 'Check out this amazing Mini App!', embeds: ['https://your-mini-app-url.com'], }); }; return ( <div> <button onClick={handleCompose}>Share Achievement</button> <button onClick={handleComposeWithEmbed}>Share Frame</button> </div> ); }
Was this page helpful?