# Facebook API 数据接口

Facebook API（数据接口）可以读帖子详情、评论、账号资料和账号发布的帖子，不用登录 Facebook 账号，也不用提供 Cookie。每次调用 2 积分（约 $0.004–$0.0067），失败不扣。Facebook 的内容不带作者粉丝数，这个字段返回 null。可以直接发 HTTP 请求，也可以通过 MCP 接到 AI 客户端里用。最近实测：2026-10-17。

- 页面：https://socialtoai.com/zh/platforms/facebook/
- 最近更新：2026-10-17
- 最近实测：2026-10-17

## 可用的动作

| 动作 | 返回什么 | 由什么参数选中 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- | --- |
| `detail` | 用链接取一条帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | — | `facebook.detail` | 2 | https://socialtoai.com/zh/facebook-detail-api.md |
| `comments` | 一条帖子下的评论：正文、点赞数、回复数和时间。 | — | `facebook.comments` | 2 | https://socialtoai.com/zh/facebook-comments-api.md |
| `user_profile` | 一个账号：名称、简介和粉丝数。 | — | `facebook.user_profile` | 2 | https://socialtoai.com/zh/facebook-user-profile-api.md |
| `user_posts` | 一个账号最近发布的帖子。 | — | `facebook.user_posts` | 2 | https://socialtoai.com/zh/facebook-user-posts-api.md |

Facebook 不提供：搜索和热榜。

## 调用示例

```bash
curl https://api.socialtoai.com/v1/detail \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "facebook",
    "url": "https://www.facebook.com/reel/2166091230582141"
  }'
```

## Facebook 给不了的字段

这些字段在对应的调用里始终是 null，并列在返回的 `unavailable` 里。

| 字段 | 哪些动作 |
| --- | --- |
| `title` | detail, user_posts |
| `author.followers` | detail, user_posts |
| `metrics.collects` | detail, user_posts |
| `metrics.reposts` | detail, user_posts |
| `hashtags` | detail, user_posts |
| `is_pinned` | detail, user_posts |
| `url` | comments |
| `parent_id` | comments |
| `root_id` | comments |
| `verified` | user_profile |
| `following` | user_profile |
| `posts_count` | user_profile |
| `author.username` | user_posts |
| `author.verified` | user_posts |
| `metrics.shares` | user_posts |
| `metrics.views` | user_posts |

## 在 AI 里直接问

- 读一下这条 Facebook 帖子的评论，告诉我大家在抱怨什么。 → detail, comments × 3: 8 积分

- 这个 Facebook 账号有多大？最近发了什么？ → user_profile, user_posts: 4 积分

- 查一下这个 Facebook 账号，告诉我它是谁。 → user_profile: 2 积分

## 能读 Facebook 的现成工具

- [评论分析](https://socialtoai.com/zh/tools/comment-insights.md)：评论里的话题和各自占比，还有提问、想买和投诉
- [账号监测](https://socialtoai.com/zh/tools/account-watch.md)：每个账号最近发了什么，哪条明显好于平时
- [达人档案](https://socialtoai.com/zh/tools/creator-card.md)：这个人在其他平台的账号、各自的数据，以及是同一人的把握
- [批量链接数据](https://socialtoai.com/zh/tools/batch-stats.md)：每条链接一行，给出现在的数字；失效的链接会标出来

## 官方 API

Facebook 的 Graph API 只有在获得「主页公开内容访问」功能后，才能读取公共主页的帖子、评论和基本信息；该功能须通过应用审核和企业验证，可能还需签署额外协议。

来源：[Facebook 官方开发者文档](https://developers.facebook.com/docs/features-reference/page-public-content-access)，核对于 2026-10-17。
