返回顶部
f

fb-personal-poster

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
67
下载量
0
收藏
概述
安装方式
版本历史

fb-personal-poster

# FB Personal Poster Post text + photos to personal Facebook timeline via Patchright stealth browser automation. ## Why Not Graph API? Facebook removed `publish_actions` permission in 2018. API cannot post to personal timelines. Only browser automation works — this skill uses Patchright (stealth Chromium) to mimic human behavior. ## Requirements ```bash cd scripts/ && pip install -r requirements.txt python -m patchright install chromium ``` ## Environment Variables | Variable | Required | Description | |----------|----------|-------------| | `FB_COOKIE_FILE` | ✅ | Path to Facebook cookies JSON (Selenium format). Full account access. | | `FB_STATE_FILE` | ✅ | Writable path for Playwright state (default: `/tmp/fb_state.json`) | | `FB_DRY_RUN` | — | `true` (default) = preview only. `false` = actually post. | | `FB_USER_AGENT` | — | Override browser user agent | ## How to Get Cookies 1. Log in to Facebook in Chrome (manually, once) 2. Export all `facebook.com` cookies as JSON via EditThisCookie extension 3. Save to path in `FB_COOKIE_FILE` with `chmod 600` Cookies last ~30–90 days. Re-export when expired. ## Usage ### Text-only post ```bash FB_COOKIE_FILE=~/.fb_cookies.json FB_DRY_RUN=false \ python3 scripts/fb_post.py -m "Hello from automation!" ``` ### Post with photos ```bash FB_COOKIE_FILE=~/.fb_cookies.json FB_DRY_RUN=false \ python3 scripts/fb_post.py -m "Beautiful day!" -p photo1.jpg photo2.jpg ``` ### Dry run (default) ```bash python3 scripts/fb_post.py -m "Test post" -p photo.jpg # No actual posting — previews the flow ``` ## OpenClaw Integration (Recommended) Use the built-in `browser` tool — already proven working for personal timeline posting: ```python # Step 1: Navigate to Facebook browser(action="navigate", url="https://www.facebook.com/") # Step 2: Confirm on personal profile (url should be facebook.com/me) # Step 3: Click "What's on your mind" browser(action="act", kind="click", ref="[post input box]") # Step 4: Type message browser(action="act", kind="type", text="Your message here") # Step 5: Upload photo (if needed) browser(action="upload", paths=["/path/to/photo.jpg"]) # Step 6: Set sharing to Public # Step 7: Click Post button browser(action="act", kind="click", ref="[post button]") ``` ### Tips - Facebook 頁面結構複雜,selector 會變,用 `snapshot` 找當前可用的 ref - 上傳圖片用 `browser(action="upload")` 功能 - 如果 timeout,重試一次通常就好 - 個人動態和粉絲專頁的操作流程不同,注意確認在正確頁面 ## Safety - Dry-run is ON by default — must explicitly set `FB_DRY_RUN=false` for live posting - Cookies stored locally with `chmod 600` — never committed to git - Human-like delays and typing speed to avoid detection

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 fb-personal-poster-1775960761 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 fb-personal-poster-1775960761 技能

通过命令行安装

skillhub install fb-personal-poster-1775960761

下载 Zip 包

⬇ 下载 fb-personal-poster v1.0.0

文件大小: 5.38 KB | 发布时间: 2026-4-13 10:15

v1.0.0 最新 2026-4-13 10:15
Initial release: Post text + photos to personal Facebook timeline via Patchright stealth browser automation

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部