Prompt
Read notes/board-meeting-october.md. Write a Facebook post for our community garden Page summarizing the 3 decisions that affect members, in plain language, under 120 words. Draft it for Facebook. How to do it
- Connect Facebook and mint a key In https://app.socialhandoff.com, open Connections, sign in with Facebook and pick the Pages to connect; each Page becomes its own channel. Then create an agent key named Gemini CLI scoped to Facebook with draft and schedule permission.
- Add the server to settings.json In ~/.gemini/settings.json or the project .gemini/settings.json, add an mcpServers entry with httpUrl set to https://app.socialhandoff.com/mcp and a headers object carrying the bearer key.
- Attach media from the workspace Gemini CLI calls attach_media for photos (up to 10, each with alt text) or one video: a public url, or the file as base64 data (up to 8 MB) with its mime type and alt text. Larger files go to POST https://app.socialhandoff.com/v1/media as multipart. The ids go into draft_post as mediaIds.
- Ask for the draft Run gemini in the notes folder with the prompt. It reads the file and calls draft_post.
- Approve for the right Page The card shows which Page the post goes to. Approve on desktop or in the phone swipe stack, and it publishes to that Page at the scheduled time.
Example draft
Three updates from this month's board meeting: 1. Plot fees stay the same next year. 2. The new tool shed opens on November 2. Bring your key card. 3. We are starting a compost rota. Sign-up sheet is on the shed door. Thanks to everyone who came. Next meeting: December 4, 19:00.
Gotchas
- A Page post can carry up to 10 photos or one video, not both. Each photo should have alt text, or the missing-alt-text guardrail flags it.
- Gemini CLI reads project settings over user settings. A stale .gemini/settings.json in the repo can point at the wrong instance.
- Facebook Page tokens do not expire, but removing the app's access in Facebook disconnects the Page. Reconnect it in Connections.
- Where you can post: Facebook Pages only. The API does not allow posting to personal profiles or to Groups through SocialHandoff.
- Page access: You need a role on the Page that allows creating content.
- Photos: One photo with alt text, or up to 10 photos in one post.
- Video: One video per post.
Frequently asked questions
Why can only testers post at first?
Meta requires App Review and Business Verification before your own developer app can post for people outside its tester list. Until then, add people under App Roles.
Which key does Gemini CLI use for the URL?
httpUrl for streamable HTTP. The url key means SSE and will not connect to the /mcp endpoint.
Can one agent post to several Pages?
Yes. Every Page granted at sign-in connects as its own channel, and a key scoped to Facebook can draft for them. Each post names its Page on the approval card.