← 返回 Skills 市场
ronnine6527

facebook_page_ronnie

作者 ronnine6527 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
50
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install facebook-page-ronnie
功能描述
Manage Ronnie's Facebook Page by posting text or photos, testing comment permissions, diagnosing token issues, and using browser fallback for blocked APIs.
使用说明 (SKILL.md)

Facebook Page Ronnie

Use this skill for Ronnie's Facebook Page operations, especially:

  • direct Page posting via Graph API
  • permission testing after Meta app changes
  • diagnosing why posting works but commenting/replying fails
  • switching to browser automation when engagement APIs are blocked

Configuration

Required environment keys:

  • FACEBOOK_PAGE_ID
  • FACEBOOK_PAGE_ACCESS_TOKEN
  • FACEBOOK_GRAPH_VERSION (optional, default v22.0)

Meaning of each config item:

  • FACEBOOK_PAGE_ID: the numeric Facebook Page ID used in Graph API endpoints
  • FACEBOOK_PAGE_ACCESS_TOKEN: the Page access token used to publish posts and test engagement actions
  • FACEBOOK_GRAPH_VERSION: optional Graph API version pin, e.g. v22.0

Quick check:

bash "\x3Cbase_dir>/scripts/check_env.sh"

How to get these two required parameters

A. Get FACEBOOK_PAGE_ID

Choose one of these methods:

  1. From the Facebook Page URL / About area

    • Open the Page in browser.
    • In some Page views, the Page ID is shown in About / transparency / professional dashboard related areas.
    • Copy the numeric Page ID.
  2. Via Graph API using your Page token Run:

    python3 - \x3C\x3C'PY'
    import os, json, urllib.request, ssl
    token = os.environ['FACEBOOK_PAGE_ACCESS_TOKEN']
    url = f'https://graph.facebook.com/v22.0/me?fields=id,name&access_token={token}'
    ctx = ssl.create_default_context()
    with urllib.request.urlopen(url, context=ctx, timeout=30) as r:
        print(r.read().decode())
    PY
    

    Expected result example:

    {"id":"123456789012345","name":"Your Page Name"}
    

    The id value is your FACEBOOK_PAGE_ID.

B. Get FACEBOOK_PAGE_ACCESS_TOKEN

Recommended path:

  1. Log in to Meta for Developers and open your app.

  2. Ensure the app has the permissions needed for your workflow, typically:

    • pages_show_list
    • pages_read_engagement
    • pages_manage_posts
    • pages_manage_engagement
    • pages_read_user_content (recommended for comment-related workflows)
  3. Generate a User Access Token for the Facebook account that manages the Page.

  4. Use that user token to query Page accounts and retrieve the Page access token:

    python3 - \x3C\x3C'PY'
    import os, json, urllib.request, ssl
    user_token = os.environ['FACEBOOK_USER_ACCESS_TOKEN']
    url = f'https://graph.facebook.com/v22.0/me/accounts?access_token={user_token}'
    ctx = ssl.create_default_context()
    with urllib.request.urlopen(url, context=ctx, timeout=30) as r:
        print(r.read().decode())
    PY
    
  5. In the returned JSON, find the target Page entry:

    • copy its id as FACEBOOK_PAGE_ID
    • copy its access_token as FACEBOOK_PAGE_ACCESS_TOKEN

Important reminders:

  • after adding new permissions, you often need to re-generate the token
  • if the app is still in Development mode, some production behaviors may stay blocked
  • the acting Facebook account must actually have the necessary Page role/permissions

Default execution policy

1. For Page post publishing

Prefer Graph API first.

Use Python request execution if curl to graph.facebook.com is unstable in the current environment.

2. For Page comments / replies

Try Graph API first only when the user explicitly wants permission verification or the token is believed to include comment/reply scopes.

If API returns permission errors such as (#200) You do not have sufficient permissions to perform this action, explain clearly that:

  • Page posting permission is working
  • engagement/comment permission is still insufficient or token has not been refreshed
  • browser automation is the fallback path

3. For browser fallback

Use browser automation when:

  • user wants direct operational completion rather than permission diagnosis
  • Facebook API comment/reply remains blocked
  • the user is willing to log in to Facebook in browser session

Recommended Python pattern for text Page post

python3 - \x3C\x3C'PY'
import os, urllib.request, urllib.parse, ssl
page_id = os.environ['FACEBOOK_PAGE_ID']
token = os.environ['FACEBOOK_PAGE_ACCESS_TOKEN']
version = os.environ.get('FACEBOOK_GRAPH_VERSION', 'v22.0')
message = 'Your post text here'
url = f'https://graph.facebook.com/{version}/{page_id}/feed'
data = urllib.parse.urlencode({
    'message': message,
    'access_token': token,
}).encode('utf-8')
req = urllib.request.Request(url, data=data, method='POST')
ctx = ssl.create_default_context()
with urllib.request.urlopen(req, context=ctx, timeout=30) as r:
    print(r.read().decode())
PY

Expected success result:

{"id":"PAGEID_POSTID"}

Recommended Python pattern for Page comment test

python3 - \x3C\x3C'PY'
import os, urllib.request, urllib.parse, ssl
version = os.environ.get('FACEBOOK_GRAPH_VERSION', 'v22.0')
token = os.environ['FACEBOOK_PAGE_ACCESS_TOKEN']
post_id = 'TARGET_POST_ID'
message = 'Test comment from API'
url = f'https://graph.facebook.com/{version}/{post_id}/comments'
data = urllib.parse.urlencode({
    'message': message,
    'access_token': token,
}).encode('utf-8')
req = urllib.request.Request(url, data=data, method='POST')
ctx = ssl.create_default_context()
try:
    with urllib.request.urlopen(req, context=ctx, timeout=30) as r:
        print(r.read().decode())
except urllib.error.HTTPError as e:
    print(e.read().decode())
PY

Typical failure observed in Ronnie's setup:

{"error":{"message":"(#200) You do not have sufficient permissions to perform this action"}}

Permission checklist for comment / reply workflows

If the user's goal includes posting, reading comments, leaving comments, and replying to comments, recommend this permission set:

  • pages_show_list
  • pages_read_engagement
  • pages_manage_posts
  • pages_manage_engagement
  • pages_read_user_content (recommended)

Also remind the user:

  1. App should be in Live mode for production behavior.
  2. The acting Facebook account should have strong Page role access.
  3. After adding permissions, the token often must be re-generated.

Troubleshooting logic

Case A — reading Page info works, posting works, commenting fails

Conclusion:

  • posting path is healthy
  • engagement permission layer is still missing or token not refreshed

Case B — curl fails but Python urllib works

Conclusion:

  • network/SSL path for curl is unstable
  • use Python request pattern as primary execution method

Case C — user insists on direct comment/reply execution

If API still fails, switch to browser automation and ask user to log in if needed.

Response style

Be concrete and short:

  • say whether you are using API or browser path
  • if comment fails, show the exact permission finding
  • avoid telling the user to do Graph API Explorer manually unless explicitly needed for debugging
安全使用建议
This result is low confidence because the provided workspace could not be inspected; review should be rerun in an environment where metadata.json and artifact files can be read.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
Review could not verify the skill purpose or capabilities from artifacts because local file inspection failed.
Instruction Scope
Review could not verify instruction scope from SKILL.md or related files.
Install Mechanism
Review could not verify install behavior from metadata or install artifacts.
Credentials
Review could not verify environment access or proportionality from the artifact directory.
Persistence & Privilege
Review could not verify persistence or privilege behavior from artifact evidence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install facebook-page-ronnie
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /facebook-page-ronnie 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Add explicit configuration items FACEBOOK_PAGE_ID and FACEBOOK_PAGE_ACCESS_TOKEN. Add setup tutorial for obtaining Page ID and Page access token, and update examples plus environment check script accordingly.
v1.0.0
Initial release. Includes Facebook Page text posting, comment/reply permission testing, token/app state troubleshooting guidance, and browser fallback workflow for blocked engagement APIs.
元数据
Slug facebook-page-ronnie
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

facebook_page_ronnie 是什么?

Manage Ronnie's Facebook Page by posting text or photos, testing comment permissions, diagnosing token issues, and using browser fallback for blocked APIs. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 50 次。

如何安装 facebook_page_ronnie?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install facebook-page-ronnie」即可一键安装,无需额外配置。

facebook_page_ronnie 是免费的吗?

是的,facebook_page_ronnie 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

facebook_page_ronnie 支持哪些平台?

facebook_page_ronnie 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 facebook_page_ronnie?

由 ronnine6527(@ronnine6527)开发并维护,当前版本 v1.0.1。

💬 留言讨论