From f8c8882858875ae3ad9b0a972abd4df3fc556b39 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 27 Mar 2026 16:33:03 +0000 Subject: [PATCH] [#297] Fix Farcaster web share embed rendering Use separate embeds[] query parameter for the story URL in the Farcaster web compose fallback instead of embedding the URL in the text body. This enables proper link preview/embed rendering on Farcaster. Miniapp SDK path unchanged. X/Twitter share unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/ShareButtons.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ShareButtons.tsx b/src/components/ShareButtons.tsx index 1167544a..2cf105dd 100644 --- a/src/components/ShareButtons.tsx +++ b/src/components/ShareButtons.tsx @@ -44,9 +44,8 @@ export function ShareButtons({ storylineId, title }: ShareButtonsProps) { // Fall through to intent URL } } - const fullText = `${shareText}\n${storyUrl}`; window.open( - `https://farcaster.xyz/~/compose?text=${encodeURIComponent(fullText)}`, + `https://farcaster.xyz/~/compose?text=${encodeURIComponent(shareText)}&embeds[]=${encodeURIComponent(storyUrl)}`, "_blank", ); }, [platform, shareText, storyUrl]);