Prompt
You manage the Facebook Page for a software company. Each Friday, read the 5 most viewed help articles this week and write one Page post that answers the most common question in plain language, with a link to the article. 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 LangChain scoped to Facebook with draft and schedule permission.
- Load the tools Connect with MultiServerMCPClient from langchain-mcp-adapters with transport streamable_http, pointing at https://app.socialhandoff.com/mcp and sending the key as a bearer header. The agent gets attach_media, draft_post, schedule_post, and preview_posts.
- Add photos only if you need them A Page post can be text and a link. For photos, the agent calls attach_media through the adapter (or you POST https://app.socialhandoff.com/v1/media/import with url and alt) and passes the ids to draft_post in mediaIds.
- Run the agent Invoke the agent on a schedule with the help center data. It calls draft_post with networks set to facebook.
Example draft
Most asked this week: "How do I add a teammate without giving them billing access?" Go to Settings, then Team, invite them, and choose the Member role. Members can use everything except billing and plan changes. You can change their role at any time. Step by step: https://example.com/help/roles
Gotchas
- Facebook Page tokens do not expire, but removing the app's access in Facebook disconnects the Page. Reconnect it in Connections.
- Tell the agent in its instructions to call attach_media before draft_post for image and video networks. Otherwise it may produce text-only drafts that cannot be approved.
- Only Facebook Pages can be connected, not personal profiles. Every Page you grant at sign-in becomes its own channel, so check which Page the card names before approving.
- 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.
Can the LangChain agent approve its own posts?
No. approve_post only works with owner keys, and an agent key can never approve its own draft.
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.