facebook

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Facebook Skill

Facebook Skill

Overview

概述

Automates Facebook operations including posting content, managing pages, participating in groups, and engaging with the social network through browser automation.
通过浏览器自动化实现Facebook操作自动化,包括发布内容、管理主页、参与群组以及与社交网络互动。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/facebook/install.sh | bash
Or manually:
bash
cp -r skills/facebook ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/facebook/install.sh | bash
或手动安装:
bash
cp -r skills/facebook ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set FACEBOOK_EMAIL "your-email@example.com" canifi-env set FACEBOOK_PASSWORD "your-password"
undefined
canifi-env set FACEBOOK_EMAIL "your-email@example.com" canifi-env set FACEBOOK_PASSWORD "your-password"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭据,由你掌控。 Canifi LifeOS尊重你的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化配置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用你的已认证会话,且全程不会获取你的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅可在你的本地机器上访问,绝不会被传输。

Capabilities

功能

  • Create posts on profile and pages
  • Manage Facebook Pages
  • Participate in groups
  • Like, comment, and share content
  • Search people and content
  • Access notifications
  • View and manage events
  • Check insights for pages
  • 在个人主页和公共主页创建帖子
  • 管理Facebook主页
  • 参与群组活动
  • 点赞、评论和分享内容
  • 搜索用户和内容
  • 查看通知
  • 查看和管理活动
  • 查看主页洞察数据

Usage Examples

使用示例

Example 1: Create a Post

示例1:创建帖子

User: "Post an update to Facebook about the product launch"
Claude: I'll create that Facebook post.
- Navigate to facebook.com
- Click create post
- Write product launch announcement
- Add any media if provided
- Publish post
- Confirm posted
用户:"在Facebook上发布关于产品发布的更新"
Claude:我来创建这条Facebook帖子。
- 导航至facebook.com
- 点击创建帖子
- 撰写产品发布公告
- 若有提供则添加媒体内容
- 发布帖子
- 确认发布成功

Example 2: Post to Page

示例2:发布到主页

User: "Post to my business page about the sale"
Claude: I'll post to your page.
- Navigate to Facebook Page
- Click create post
- Write sale announcement
- Schedule or publish immediately
- Confirm posted
用户:"在我的商业主页上发布关于促销活动的内容"
Claude:我来发布到你的主页。
- 导航至Facebook主页
- 点击创建帖子
- 撰写促销活动公告
- 安排发布时间或立即发布
- 确认发布成功

Example 3: Engage in Group

示例3:参与群组互动

User: "Post in the Marketing Professionals group"
Claude: I'll post in that group.
- Navigate to Marketing Professionals group
- Create new post
- Write content
- Submit for approval if required
- Confirm posted or pending
用户:"在营销专业人士群组中发布内容"
Claude:我来在该群组发布内容。
- 导航至营销专业人士群组
- 创建新帖子
- 撰写内容
- 若需要则提交审核
- 确认已发布或处于待审核状态

Example 4: Check Page Insights

示例4:查看主页洞察数据

User: "Show me my Facebook Page insights"
Claude: I'll pull those insights.
- Navigate to Page Insights
- Gather reach and engagement data
- Compile follower growth
- Present analytics summary
用户:"展示我的Facebook主页洞察数据"
Claude:我来提取这些洞察数据。
- 导航至主页洞察页面
- 收集触达量和互动数据
- 整理粉丝增长情况
- 呈现分析摘要

Authentication Flow

认证流程

  1. Navigate to facebook.com via Playwright MCP
  2. Enter email and password from canifi-env
  3. Handle 2FA if enabled (notify user via iMessage)
  4. Handle device recognition prompt
  5. Verify news feed access
  6. Maintain session cookies
  1. 通过Playwright MCP导航至facebook.com
  2. 从canifi-env中读取邮箱和密码并输入
  3. 若启用双因素认证则处理(通过iMessage通知用户)
  4. 处理设备识别提示
  5. 验证是否可访问新闻动态
  6. 保留会话Cookie

Error Handling

错误处理

  • Login Failed: Clear cookies, verify credentials
  • Session Expired: Re-authenticate automatically
  • 2FA Required: iMessage for verification code
  • Account Checkpoint: Handle security verification
  • Rate Limited: Implement backoff
  • Content Blocked: Check community standards
  • Page Access Denied: Verify page admin role
  • Group Approval: Notify of pending status
  • 登录失败:清除Cookie,验证凭据
  • 会话过期:自动重新认证
  • 需要双因素认证:通过iMessage发送验证码
  • 账户验证 checkpoint:处理安全验证
  • 速率限制:实现退避机制
  • 内容被屏蔽:检查社区准则
  • 主页访问被拒绝:验证主页管理员权限
  • 群组审核:通知待审核状态

Self-Improvement Instructions

自我改进说明

When encountering new Facebook features:
  1. Document new UI elements
  2. Add support for new post types
  3. Log successful page patterns
  4. Update for Meta platform changes
当遇到Facebook新功能时:
  1. 记录新的UI元素
  2. 添加对新帖子类型的支持
  3. 记录成功的页面操作模式
  4. 根据Meta平台更新进行适配

Notes

注意事项

  • Facebook frequently updates interface
  • Pages have different features than profiles
  • Group posts may need approval
  • Meta Business Suite for page management
  • Some features require admin access
  • API changes affect automation
  • Privacy settings affect visibility
  • Facebook会频繁更新界面
  • 主页与个人主页的功能不同
  • 群组帖子可能需要审核
  • 使用Meta Business Suite管理主页
  • 部分功能需要管理员权限
  • API变更会影响自动化效果
  • 隐私设置会影响内容可见性