
借助悄悄回复功能,企业的 Facebook 公共主页可以向发布帖子的用户、在帖子或公共主页上发表评论的用户发消息。
九月,我们针对 Facebook 小组扩展了这项功能支持,让企业能够在 Facebook 小组中向为其公共主页的帖子发布评论的用户发送悄悄回复。

要为帖子或评论发送悄悄回复,请向 /PAGE-ID/messages 端点发送 POST 请求,并将 recipient 参数设置为 post_id 或 comment_id,将 message 参数设置为你要发送的消息。
以下示例显示了对客户在你公共主页上发布的帖子的回复:
你好,我想给我侄子买一件礼物。你有什么推荐吗?
curl -X POST -H "Content-Type: application/json" -d '{
"recipient": {
"post_id": "PAGE-POST-ID"
},
"message": {
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"Of course, what is your budget for the gift?",
"buttons":[
{
"type": "postback",
"title": "LESS THAN $20",
"payload": "GIFT_BUDGET_20_PAYLOAD"
},
{
"type": "postback",
"title": "$20 TO $50",
"payload": "GIFT_BUDGET_20_TO_50_PAYLOAD"
},
{
"type": "postback",
"title": "MORE THAN $50",
"payload": "GIFT_BUDGET_50_PAYLOAD"
}
]
}
}
}
}' "https://graph.facebook.com/<GRAPH-API-VERSION>/PAGE-ID/messages?access_token=<PAGE-ACCESS-TOKEN>"
像这样触发悄悄回复流程。
如需更多信息,请查看下方文档:
订阅以接收 Meta 开发者每月动态。