登录开始免费试用
easyCoexistence 官方 API

Facebook Page Webhook 字段:完整列表

Meta 的 Page Webhook 参考文档列出了 64 个订阅字段:feed 用于帖子、评论和表情反应,mention 用于提及该 Page 的内容,Messenger 字段包括 messages、message_echoes、messaging_postbacks 和 message_reads,资料字段包括 name、picture、hours 和 website。每个字段都需要 pages_manage_metadata 权限。应用只有在应用层级和 Page 层级都通过 subscribed_apps 订阅某字段后,才会收到该字段的 Webhook。

easyCoexistence 为您连接的每个 Page 订阅 feed、messages 和 mention,并在事件到达时通过 HTTPS 端点转发至您的服务器,同时使用 X-EC-Signature 签名。

64

Meta 的 Page Webhook 参考文档中记录的订阅字段,从 feed 和 mention 到 Messenger 与资料字段。

pages_manage_metadata

Page 管理员(需具备 MODERATE 权限)必须先授予相应权限,Page Webhook 才能送达应用。

message_echoes

Page 发出的消息对应一个单独的 Messenger 字段,仅适用于 Messenger 对话。

ADVERTISE

订阅 leadgen 需要的 Page 任务,包括 leads_retrieval、ads_management、pages_read_engagement 和 pages_manage_metadata。

Both levels

只有在 Page 和应用两个层级都订阅的字段,才会产生 Webhook。

Page Webhook 字段如何组织?

Meta 将这些字段集中记录在 Page 对象的一个参考页面上,可分为三类:Page 及其周边的活动、Messenger 对话,以及 Page 自身详情的编辑。feed、mention 和资料变更会在 entry.changes 中到达,每项注明其字段;若应用关闭了 Include Values,则以 changed_fields 形式到达。Messenger 事件则在 entry.messaging 中到达;对于不拥有该会话线程的应用,则在 entry.standby 中到达。

哪些字段报告 Page 上的活动?

有十二个字段涵盖的是内容与活动,而非对话。例如,新评论会以 feed 的变更形式到达,其中 item 设为 comment,verb 设为 add,同时还包括表情反应、分享以及 Page 自己发布的内容。以下是 Meta 参考文档中各字段的说明:

feedNearly all changes to the Page's feed: posts, comments, reactions, shares; likes only below 10,000 likes
mentionNew mentions of the Page in posts and comments; some IDs it returns cannot be queried
ratingsNew ratings, and comments or reactions on a rating
videosChanges to the encoding status of a video on the Page
live_videosChanges to a live video's status, with its ID
leadgenNew leads from the Page's lead ads, with leadgen_id, form_id and ad_id
group_feedComments on the Page's posts in the business's Facebook Group
product_reviewA product item's review status: pending, approved, rejected or outdated
inbox_labelsLabel changes on people in the Page inbox: the user, the action and the label
page_upcoming_changeUpcoming changes to the Page, with their type and effective time
page_change_proposalProposals to change the Page, created, accepted or rejected
invoice_access_invoice_draft_changeChanges to an invoice draft, such as its shipping address

哪些字段承载 Messenger 事件?

Messenger 的字段数量最多,Meta 的 Messenger Webhook 指南说明了每个字段发送的内容。以下十三个字段涵盖 Page 的对话。standby 用于向不拥有该会话线程的应用发送消息,记录在该指南中,而非 Page 参考文档中:

messagesA message from a person, through any entry point, with text or attachments
message_echoesA message the Page sent, with the app_id of the app that sent it
message_deliveriesA message from the Page was delivered
message_readsThe person read a message from the Page
message_reactionsThe person reacted to a message from the Page
message_editsThe person edited a message they had sent
messaging_postbacksA tap on a postback button, Get Started or a persistent menu item
messaging_referralsThe person came back to the conversation through an m.me link or an ad
messaging_optinsA Messenger plugin click, an accepted message request or a checkbox opt-in
messaging_handoversThread control passed, taken or requested between apps
messaging_policy_enforcementA policy warning, block or unblock on the Page's messaging
messaging_account_linkingThe person linked or unlinked their account with the business
response_feedbackFeedback buttons, such as thumbs up or down, on a message the Page sent

还有哪些 Messenger 字段?

另有十个字段服务于特定产品,涵盖从语音通话到电商与完整性报告:

  • send_cart:包含购物车或订单信息的消息;message_context:Meta 模型对某条消息作出的检测,包含事件名称和分数。
  • calls、call_settings_update 和 call_permission_reply:Messenger 语音通话、Page 通话设置的更改,以及用户对通话权限请求的回复。
  • messaging_customer_information:用户在客户信息页面填写的内容;messaging_in_thread_lead_form_submit:在对话中提交的潜在客户表单。
  • message_template_status_update:实用类消息模板的审核状态发生变化。
  • business_integrity 和 messaging_integrity:完整性更新,其中 business_integrity 包含违规、限制和处理事件。

哪些字段报告 Page 资料变更?

有二十九个字段报告 Page 自身详情的编辑,每个详情对应一个字段,各自以变更形式到达,并注明字段名称:

  • 身份信息:name、picture、category(最多可设三个类别)以及 description(即 Story Description)。
  • 业务详情:company_overview、mission、founded、products、general_info、general_manager、members、awards 和 affiliation。
  • 联系方式与地点:email、phone、website、location、hours、current_location、hometown、parking 和 public_transit。
  • 场所:price_range、payment_options、attire 和 culinary_team。
  • 个人:birthday、personal_info 和 personal_interests。

每个字段需要哪项权限?

这些字段均需要 pages_manage_metadata 权限,由具备 MODERATE 权限的 Page 管理员授予,部分字段还需要更多权限。Page 通过 subscribed_apps 订阅,Meta 指南按字段类别设定访问令牌和权限。若要接收应用自身角色之外人员的事件,相关权限还需要 Advanced Access:

PermissionsTask of the person behind the token
Any fieldpages_manage_metadata and pages_show_listCREATE_CONTENT, MANAGE or MODERATE
messages and other Messenger fieldspages_messaging as wellMESSAGING
leadgenleads_retrieval, pages_read_engagement and ads_management as wellADVERTISE

easyCoexistence 订阅哪些字段?

三个:feed、messages 和 mention。当 Page 连接时,easyCoexistence 会发送 POST /{page-id}/subscribed_apps,带上这些字段和该 Page 的访问令牌,然后将该 Page 的每个 entry 转发到您设置的端点,并使用 X-EC-Signature 签名。评论规则和自动化会处理 feed 中的新评论及 messages,mention 则原样转发。其他字段均未订阅,因此回显(echoes)、回传事件(postbacks)、已读回执(receipts)、线程交接(handovers)、standby 以及资料变更均不会被转发。

常见错误

  • 让 Page 订阅应用未订阅的字段。Meta 只会投递在 Page 和应用两个层级都已订阅的字段。
  • 把 Messenger 事件当作 changes 解析。它们位于 entry.messaging 中,每个 entry 包含一个 messaging 对象,而非 entry.changes。
  • 期望在消息上收到 Page 自己的回复。Page 发送的消息会到达 message_echoes,这是一个独立字段。
  • 在大型 Page 上依赖 feed 获取点赞。Meta 仅对点赞数少于 10,000 的 Page 发送点赞通知。
使用 EasyCoexistence 完成这些操作

评论规则和自动化则处理新评论和消息。每个连接每月 US$ 9 至 US$ 0.75,连接越多,单价越低,前 3 天免费试用。

常见问题

feed 字段是否包含广告上的评论?

包含。Meta 不会为广告帖子本身发送任何内容,但广告上的评论会通过 feed 到达。

Include Values 设置会改变什么?

开启时,变更中会包含新值,位于 changes 中。关闭时,Meta 仅发送已变更字段的名称,位于 changed_fields 中。

如何查看 Page 订阅了哪些字段?

使用 Page 的访问令牌发送 GET /{page-id}/subscribed_apps,即可列出该 Page 已安装的应用,以及每个应用的 subscribed_fields。

easyCoexistence 会转发 Page 资料变更吗?

不会。连接到 easyCoexistence 的 Page 仅订阅 feed、messages 和 mention,因此 name、picture 及其他资料字段均不会被转发。

继续阅读

两分钟连接您的第一个渠道。

无需等待平台审核。连接 WhatsApp、Instagram、TikTok 或其他渠道,然后让您的 AI 发布、回复或生成报告,看它如何运作。

  • 免费试用 3 天
  • 随时取消
  • 仅使用官方 API
  • 全天候 24/7 监控

验证时间