> For the complete documentation index, see [llms.txt](https://knowledgebase.offer18.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.offer18.com/zh/lian-meng-huo-ban/ji-cheng/facebook-zhuan-hua-api.md).

# Facebook 转化 API

使用 Facebook 转换 API，您可以轻松将转化数据直接发送到 Facebook。这有助于您跟踪广告效果并提升广告表现，全部无需使用第三方 Cookie。

{% hint style="info" %}
要使用 Facebook 转换 API，您需要：一个 **数据集 ID** 和一个 **访问令牌**.
{% endhint %}

### 从 Facebook 商业账户获取必要数据&#x20;

#### 数据集 ID

1. 所有工具 **»** 事件管理器 **»** 数据来源
2. 连接数据来源 **»** 定义数据来源名称 **»** 下一步&#x20;
3. Meta 像素与转换 API（推荐） **»** 下一步&#x20;
4. 在“附加事件”中选择事件（按需） **»** 继续&#x20;
5. 选择客户信息参数&#x20;
6. 查看设置 **»** 完成&#x20;
7. 现在点击已创建数据来源的“设置”以复制数据集 ID

#### 对于访问令牌

1. 在同一页面向下滚动 **»** 移至转换 API 部分
2. 转到 **生成访问令牌** （在“设置直接集成”下） **»** 复制访问令牌

<figure><img src="/files/59309f481016b211f45dcde31ac337c4fb84635a" alt=""><figcaption></figcaption></figure>

***

### 在 Affiliate 仪表板中放置数据集 ID 和访问令牌

1. 登录 Affiliate 仪表板 **»** 打开相应的要约&#x20;
2. 转到 Postback 部分

<figure><img src="/files/f00d61aef4938ca168b184225f4c5a9abc40422b" alt=""><figcaption></figcaption></figure>

3. 在类型中选择 Facebook
4. 投放地点 **数据集 ID** 和 **访问令牌**&#x20;
5. 选择事件&#x20;
6. 定义 Facebook 事件
7. Facebook 用户数据（Facebook 用户数据中必须传递两个值）

<figure><img src="/files/a8c823d330a98f28008f44c432cf03300fcb1eeb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

* 对于 facebook Click ID 使用 **{aff\_click\_id}**&#x20;
* 对于其他值，请使用来自的附加参数 **{aff\_sub1}** 到 **{aff\_sub5}**
  {% endhint %}

8. 转到 提交

{% hint style="info" %}
要使用现有的 **数据集 ID** 和 **访问令牌**，点击“使用现有”，然后从下拉列表中选择数据集 ID。
{% endhint %}

确保在 Affiliate 跟踪链接中使用相同的参数以接收来自 Facebook 的值。fbclid 值将被自动跟踪，因此在 Affiliate 跟踪链接中不需要 aff\_click\_id。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.offer18.com/zh/lian-meng-huo-ban/ji-cheng/facebook-zhuan-hua-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
