Facebook mention webhook: when someone mentions your Page
The mention field of Facebook's Page webhooks notifies an app when someone @mentions the Page in a post or a comment. Meta sends a change with field set to mention, whose value can carry the post_id, the comment_id for a comment, the text in message, attached links and media, and item and verb, in a POST signed with X-Hub-Signature-256.
easyCoexistence subscribes each Page you connect to the mention field, beside feed and messages, and forwards its mention events to your HTTPS endpoint as they arrive, signed with a secret for that Page and with no copy kept, so your agent knows about each mention as it happens.
Page webhook field for new mentions of a Page, including mentions in comments and posts.
Permission a Page admin with MODERATE privileges must grant before Page webhooks reach an app's callback URL.
How people mention a Page in a post or comment: type @ and the Page's name, then pick it.
How long Meta retries a failed Page notification, with decreasing frequency, before dropping it.
Field the /{page-id}/tagged edge adds to each public post in which the Page has been tagged.
What sets off the mention webhook?
Someone mentioning the Page in a post or a comment. On Facebook, a mention is made by typing @ and the Page's name and picking it from the suggestions, and Meta's reference describes the field as new mentions of a Page, including mentions in comments and posts. Facebook's Help Center notes that a Page's settings can keep people from mentioning it.
What does a mention notification look like?
A POST with object set to page and one entry for the mentioned Page: its ID, a time and a changes array whose field is mention. Meta's reference lists the value's fields but gives no sample, so this mention in a post is shaped from that list:
{
"object": "page",
"entry": [
{
"id": "<PAGE_ID>",
"time": 1793520000,
"changes": [
{
"field": "mention",
"value": {
"item": "post",
"verb": "add",
"post_id": "<POST_ID>",
"message": "<TEXT_WITH_THE_MENTION>"
}
}
]
}
]
}What does each field of a mention mean?
These are the value's fields in Meta's reference; which ones a notification carries depends on the post or comment:
post_id: the ID of the post that mentioned the Page.comment_id: the comment's ID, when the mention is in a comment;parent_id: the ID of its parent.- message: the text that carries the mention.
- link, photo, photos and video: links to what the post or comment has attached.
- item and verb: the kind of object and what happened to it, from the same lists the feed field uses.
created_time: when the post or comment was created.- from and
message_tags: the author and the profiles tagged in the text, both marked Workplace only. - Also listed: action,
album_id,event_id,photo_id,video_id,share_id, published,reaction_type,recipient_idandopen_graph_story_id.
Which permission does the mention field need?
pages_manage_metadata, which Meta requires a Page admin with MODERATE privileges to grant before Page webhooks reach an app. The Page is subscribed through POST /{page-id}/subscribed_apps with mention among its subscribed_fields, using a Page token from someone with the CREATE_CONTENT, MANAGE or MODERATE task, with pages_manage_metadata and pages_show_list. The app subscribes to mention too, since only fields subscribed at both levels are delivered, and Pages run by people without a role on the app need those permissions in Advanced Access.
How do you read the post or comment that mentions the Page?
By its ID, with the Page's token, where Meta allows it. A Page token reads posts published to or by the Page; publicly shared posts of other Pages need pages_manage_posts and the Page Public Content Access feature, on a token from a Page admin; and Meta ties reading a person's own post to that person's user_posts permission.
GET https://graph.facebook.com/<POST_ID>
?fields=message,permalink_url,created_time
&access_token=<PAGE_ACCESS_TOKEN>
GET https://graph.facebook.com/<COMMENT_ID>
?fields=message,from,created_time
&access_token=<PAGE_ACCESS_TOKEN>Where else can a Page find its mentions?
On the tagged edge. GET /{page-id}/tagged lists the public posts in which the Page has been tagged, each with a tagged_time, which also covers posts from before the webhook was set up. It takes a Page token from someone with the CREATE_CONTENT, MANAGE or MODERATE task, with pages_read_user_content and pages_show_list, and Meta says the Page Public Content Access feature may be required. On a person's post, Meta returns from only to the person who wrote it.
How does easyCoexistence deliver mention events?
It subscribes each Page to mention, beside feed and messages, when the Page connects. Its app checks X-Hub-Signature-256 on each delivery, answers Meta at once and POSTs each entry for the Page, unchanged, to the HTTPS endpoint you set with set_social_webhook_destination or PUT /channels/:id/webhook on the Partner API:
- X-EC-Signature carries t=<unix>,v1=<hex>: the HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with the Page's signing secret.
- The secret starts with whsec_ and is shown once; setting the URL again issues a new one, and a null URL stops forwarding.
- Each entry goes out once, waiting up to 8 seconds, to an HTTPS address that resolves to a public IP, with no redirects followed and no copy kept.
POST <YOUR_ENDPOINT>
Content-Type: application/json
X-EC-Signature: t=1793520001,v1=<HEX_HMAC_SHA256>
{
"platform": "facebook",
"account_id": "<ACCOUNT_ID>",
"external_id": "<PAGE_ID>",
"entry": {
"id": "<PAGE_ID>",
"time": 1793520000,
"changes": [
{
"field": "mention",
"value": {
"item": "post",
"verb": "add",
"post_id": "<POST_ID>",
"message": "<TEXT_WITH_THE_MENTION>"
}
}
]
}
}Common mistakes
- Reading entry.time as the moment of the mention. Meta sets it to when the notification was sent; created_time in the value dates the post or comment.
- Treating a lookup that fails as a broken event. Meta warns that some post_id and comment_id values in mention notifications cannot be queried, for lack of permission or for privacy, so keep the message text from the event itself.
- Fetching the post before answering the forward. Forwards are not retried, so return a 2xx at once and look the post up afterwards.
US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Does the mention webhook say who mentioned the Page?
Not for a Page: Meta's reference marks from as Workplace only. Looking the post or comment up by its ID can return its author where Meta's permissions allow.
Can I get mentions from before the Page was subscribed?
Not from the webhook, since Meta keeps no notification history to query. The tagged edge lists the public posts in which the Page has been tagged.
How is the mention field different from feed?
feed reports changes on the Page's own feed, such as posts, comments and reactions there; mention reports the Page being @mentioned in a post or a comment. Each field is subscribed on its own.
Do easyCoexistence's comment rules act on mentions?
No. Rules and automations act on comments from the feed field and on Messenger messages; mention changes are forwarded to your endpoint just as Meta sent them.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on