Publish text, link or photo posts to your Facebook Page via the Facebook Pages API, and read your Page's recent posts.
Skill by acedatacloud
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/acedatacloud-facebook
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/facebook
What's inside
- Skill name
facebook- Description
- Publish text, link or photo posts to your Facebook Page via the Facebook Pages API, and read your Page's recent posts. Use when the user wants to post to their Facebook Page, share a link, publish a photo, or review their own Page posts. Auth uses a Page access token (BYOC). 支持 Facebook 主页文本 / 链接 / 图片发帖。
- License
- Apache-2.0
- Metadata
- author: acedatacloud · version: 1.0
- Instructions
- 119 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
Call the **Facebook Graph API** (`graph.facebook.com`) with `curl + jq`. The
connector injects `$FACEBOOK_ACCESS_TOKEN` (a **Page** access token with
`pages_manage_posts` + `pages_read_engagement`) and optionally
`$FACEBOOK_PAGE_ID`. Never echo them.
The Graph API publishes only to a **Facebook Page** you manage — it cannot post
to a personal profile timeline.
### Resolve the Page id
If `$FACEBOOK_PAGE_ID` is set, use it. Otherwise derive it from the token — try
the **Page-token** path first (`/me` is the Page), then fall back to the
**user-token** path (`/me/accounts` → first managed Page), so either token type
the connector accepts resolves cleanly:
```bash
if [ -n "$FACEBOOK_PAGE_ID" ]; then
PAGE="$FACEBOOK_PAGE_ID"
else
# Page access token: /me IS the Page
PAGE=$(curl -sS "https://graph.facebook.com/v21.0/me?fields=id,name&access_token=$FACEBOOK_ACCESS_TOKEN" | jq -r 'select(.name).id // empty')
if [ -z "$PAGE" ]; then
# User access token: list the managed Pages, take the first
PAGE=$(curl -sS "https://graph.facebook.com/v21.0/me/accounts?access_token=$FACEBOOK_ACCESS_TOKEN" | jq -r '.data[0].id // empty')
fi
fi
echo "page_id=$PAGE"
```
Errors are JSON with `error.message` / `error.code` — show them verbatim.
`401` / `OAuthException` → token expired or missing scope; a null `PAGE` → the
token isn't a Page token / manages no Page (see Gotchas). Reconnect if needed.
> If the user token path is used, `/me/accounts` also returns a per-Page
> `access_token` in `.data[0].access_token`. Prefer that Page token for the
> publish call when the injected token is a user token; a Page's own token is
> what `pages_manage_posts` actually authorizes.
## Publish a text or link post
**Confirm the message (and link, if any) with the user first.** Post to
`/{page-id}/feed`:
```bash
# Text-only post
curl -sS -X POST "https://graph.facebook.com/v21.0/$PAGE/feed" \
--data-urlencode "message=One endpoint → posters, cards, mockups. #AI #API" \
-d "access_token=$FACEBOOK_ACCESS_TOKEN" | jq .
# → {"id":"<PAGE_ID>_<POST_ID>"}
# Link post — Facebook renders a link preview card from the URL
curl -sS -X POST "https://graph.facebook.com/v21.0/$PAGE/feed" \
--data-urlencode "message=Read our new guide 👇" \
-d "link=https://acedata.cloud/blog/xxxx" \
-d "access_token=$FACEBOOK_ACCESS_TOKEN" | jq .
```
## Publish a photo post
Post to `/{page-id}/photos` with a **public image URL** (Facebook server-side
fetches it); `caption` is the post text:
```bash
curl -sS -X POST "https://graph.facebook.com/v21.0/$PAGE/photos" \
-d "url=https://cdn.acedata.cloud/xxxx.jpg" \
--data-urlencode "caption=One endpoint → posters, cards, mockups. #AI #API" \
-d "access_token=$FACEBOOK_ACCESS_TOKEN" | jq .
# → {"id":"<PHOTO_ID>","post_id":"<PAGE_ID>_<POST_ID>"}
```
To attach **multiple photos** to one post: upload each with `published=false` to
get its media id, then create the feed post with
`attached_media[0]={"media_fbid":"<ID1>"}` … for each.
## Get the post permalink
Use the returned `post_id` (or `id`) to fetch the live URL to hand back:
```bash
curl -sS "https://graph.facebook.com/v21.0/<PAGE_ID>_<POST_ID>?fields=permalink_url&access_token=$FACEBOOK_ACCESS_TOKEN" | jq -r .permalink_url
```
## Read recent Page posts
```bash
curl -sS "https://graph.facebook.com/v21.0/$PAGE/posts?fields=id,message,created_time,permalink_url&limit=10&access_token=$FACEBOOK_ACCESS_TOKEN" | jq .
```
## Gotchas
- **Pages only, not profiles** — the Graph API cannot publish to a personal
timeline. If the user asks to post to their profile, explain this limitation.
- **Page token, not user token** — publishing needs a Page access token with
`pages_manage_posts`. If you only have a user token, resolve the Page token via
`/me/accounts` (see above). A `(#200)` permissions error means the token lacks
`pages_manage_posts` or the user isn't an admin of the Page.
- **Photo URL must be public** on a server Facebook can reach; local files won't
work. Host on cdn.acedata.cloud first.
- **Page Publishing Authorization (PPA):** some Pages must complete PPA before API
publishing works — surface the API error verbatim if it mentions PPA.
- **Token expiry:** a Page token derived from a short-lived user token expires
fast. If posting 401s soon after connecting, the user needs a long-lived Page
token — surface the `OAuthException` verbatim and suggest reconnecting.
- API version: keep the `vXX.0` path current if you hit a version/deprecation error.
## Record the output
After you successfully publish and obtain the live permalink, call the built-in
`publish_artifact` tool ONCE so the user can track it in **My Outputs**:
```
publish_artifact(kind="post", channel="facebook", title="<title>", url="<the REAL permalink>", status="delivered")
```
Use the real returned URL — never fabricate one. Call it once per published item,
only after delivery is confirmed; skip it (or use `status="failed"`) if publishing failed.
See `_shared/artifacts.md`.From AceDataCloud/Skills, Apache-2.0.
More from AceDataCloud/Skills
- 0.646score
didi-ride
acedatacloud
通过滴滴出行 MCP 打车、查价、查询订单、取消订单、规划路线(驾车/公交/步行/骑行)和搜索地点。Use when the user mentions 滴滴, 打车, 叫车, 回家/上班要打车, 查一下从 A 到 B 多少钱/怎么走, 查询订单, 司机在哪/多久到, 预约叫车, 路线规划, DiDi…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
ghost
acedatacloud
Create drafts and publish or update posts on a self-hosted Ghost site through the official Admin API.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
apple-notes
acedatacloud
Manage Apple Notes on macOS — list, search, read, create, append, move, delete, and export notes, and manage folders.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cto51
acedatacloud
Read the connected 51CTO 博客 (blog.51cto.com) account and create Markdown article drafts with the user's own login cookies (BYOC).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
discord
acedatacloud
Work with the user's Discord account.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bilibili
acedatacloud
Read and publish 专栏 articles on Bilibili (bilibili.com) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
capability-spotlight-video
acedatacloud
Plan and submit a recurring series of diverse, premium Ace Data Cloud sales films.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cnblogs
acedatacloud
Publish, update and read CNBlogs (博客园) posts with a personal access token through the API used by the official vscode-cnb client.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bluesky
acedatacloud
Publish (with optional images), delete and read your own posts on Bluesky via the AT Protocol (XRPC).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
csdn
acedatacloud
Read and publish on CSDN (blog.csdn.net) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats, inspect one…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
acedatacloud
acedatacloud
Manage your AceDataCloud account through the management API (platform.acedata.cloud).
SkillAFreshness: A★ 17Claude Code +9 - 0.643score
discordbot
acedatacloud
List channels, read recent messages, send channel messages, and send a single user-initiated DM on Discord using the user's own bot via the Discord REST API.
SkillAFreshness: A★ 17Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 17
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 21, 2026 (3 months ago)
- Last release
- Oct 23, 2026 (4 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0
- License
- Apache-2.0
- Repository
- github.com/AceDataCloud/Skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from acedatacloud
- 0.646score
acedatacloud
acedatacloud
Manage your AceDataCloud account through the management API (platform.acedata.cloud).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
apple-notes
acedatacloud
Manage Apple Notes on macOS — list, search, read, create, append, move, delete, and export notes, and manage folders.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cnblogs
acedatacloud
Publish, update and read CNBlogs (博客园) posts with a personal access token through the API used by the official vscode-cnb client.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bilibili
acedatacloud
Read and publish 专栏 articles on Bilibili (bilibili.com) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
capability-spotlight-video
acedatacloud
Plan and submit a recurring series of diverse, premium Ace Data Cloud sales films.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bluesky
acedatacloud
Publish (with optional images), delete and read your own posts on Bluesky via the AT Protocol (XRPC).
SkillAFreshness: A★ 17Claude Code +9
Cite this page
facebook skill. Agent Mart. https://agentmart.dev/skills/acedatacloud-facebook (last updated 2026-10-24)