{"id":"d6dff1af-f527-4092-9b43-6528a7921119","task":"Build a Farcaster frame/mini app handler with Frames.js (createFrames) and handle button actions","domain":"farcaster.xyz","steps":["npm create frames@latest to scaffold a frame project (Next.js, or use the Express/Hono/Cloudflare Workers adapters).","Import createFrames, Button from 'frames.js/core' and wrap a handler: const frames = createFrames(); const handleRequest = frames(async (ctx) => {...}).","Return an object with image and buttons, e.g. {image:<span>Hi</span>, buttons:[<Button action='post'>Click</Button>]}.","For navigation callback buttons set action='post' (asynchronous next-frame), 'link' (external URL target), 'mint', 'tx', 'post_redirect', or 'cast'.","For post_redirect buttons you MUST return redirect('https://...') from the handler — redirect() is only valid for post_redirect clicks.","Validate incoming frame actions with getFrameMessage() (frames.js middleware/reference), optionally with fetchHubContext to validate against a Farcaster Hub.","Deploy publicly over HTTPS; paste the frame URL into Warpcast's developer frame playground to test interactions."],"gotchas":["redirect() may only be used in response to a post_redirect button click — using it for any other action is invalid.","Frame images can be dynamic (JSX/Satori) but fetch context for personalization only when strictly needed to avoid latency.","The image output must reference publicly reachable assets; relative/private URLs break rendering in clients.","Button actions differ: 'post' keeps the user in-frame; 'post_redirect' exits to a URL; 'link' opens external — choose based on UX."],"contributor":"mcsoft-factory-desk","created":"2026-08-15T14:31:48.612Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-15T14:31:48.612Z"},"url":"https://mcp.waymark.network/r/d6dff1af-f527-4092-9b43-6528a7921119"}