Disclosure: I'm Mohammad Hayat, a Sr. AI Engineer at Nextoria, where we build PersonaXpand, a social media tool that replies to comments and DMs. Everything below is how we handle Instagram comments in production. Meta doc links were checked on 13 Nov 2026.
You subscribed to the comments field. You clicked Test in the App Dashboard and the sample arrived. Then a real person comments on a real post and your endpoint hears nothing.
Below: the seven causes we'd check, in order, then a polling backstop that catches what webhooks miss, costs about one API call when nothing changed, and shares a dedupe path with the webhook. The code is C# from our ASP.NET Core app, trimmed, with internal names simplified.
Check these first: 7 reasons the comments webhook stays silent
1. You're testing from the account that owns the post
Meta's Self Messaging docs (checked 13 Nov 2026) say a comment by the professional account on its own post does generate a comments webhook, with a self_ig_scoped_id in from. The catch is your own code: any auto-reply system needs a guard that drops the account's own comments, or it answers its own replies. Ours does, so an owner-account test looks like a dead webhook. Test from a second account.
2. The app is subscribed, but the account isn't
There are two layers. The app subscribes to fields in the App Dashboard. Then each connected account has to be enabled with a POST to its /subscribed_apps edge, passing subscribed_fields and that account's token. The webhooks setup guide (checked 13 Nov 2026) lists the host and token per login type: graph.instagram.com with an Instagram User token for Instagram Login, graph.facebook.com with a Page token for Facebook Login. The dashboard Test button never touches this second layer, which is why it can pass while real events don't flow.
3. Your app is in development mode or lacks the right access level
The same setup guide says the app must be Live to receive notifications for app users, and that Advanced Access is required for comments and live_comments notifications. The permissions for comments are instagram_business_basic plus instagram_business_manage_comments on Instagram Login, and instagram_basic plus instagram_manage_comments (and pages_read_engagement) on Facebook Login, per the Comment Moderation docs (checked 13 Nov 2026). Note the docs aren't fully consistent: Comment Moderation describes Standard Access for accounts you own or manage. If your own account works and customer accounts don't, access level is the first suspect.
4. Your signature check rejects every delivery
Meta signs each payload with HMAC-SHA256 and sends it in X-Hub-Signature-256 as sha256=<hex>, computed with your app's secret (Graph API webhooks guide, checked 13 Nov 2026). Two ways this goes wrong:
- You hash a re-serialized body. If a framework parses the JSON and you hash the re-serialized object, the bytes differ and no signature ever matches. Hash the raw body exactly as received.
- You check the wrong secret. We connect Facebook Pages and Instagram (via Instagram Login) through two different Meta apps. Checking a single secret could only ever validate one of them. Our verifier's comment describes the failure well:
// Both apps share a verify token, so the GET handshake succeeds either way and
// the subscription looks healthy in the dashboard while every POST is rejected with a 403.
So our controller buffers the raw body first, then tries each configured app secret with a constant-time compare:
Request.EnableBuffering();
string rawBody;
using (var reader = new StreamReader(Request.Body, Encoding.UTF8, leaveOpen: true))
rawBody = await reader.ReadToEndAsync(ct);
Request.Body.Position = 0;
if (!SignatureVerifier.Verify(config, rawBody, signatureHeader))
return StatusCode(403);
We also log which secret matched (the key name, never the value), so a subscription registered under the wrong app shows up in the logs.
5. The media owner is private, or the Live has ended
From the setup guide's limitations: the account that owns the media must be public, and private accounts don't receive comment or mention notifications. Live comment notifications stop when the broadcast ends. Album child media also need care: notifications don't include album IDs, so you look up the album from the comment ID.
6. The subscription was made under an old field list
The setup guide's limitations say an account receives every field selected for the app. Our code records a different experience: when we added live_comments, accounts subscribed under the old field list missed those events. Our fix is a small hosted service that re-subscribes every active Instagram Login account at startup with the current field list. The call is idempotent, so running it on every boot is safe. It's one call per account, with a short delay between accounts.
7. Meta didn't deliver it, and you can't ask again
The setup guide says Meta retries a failed delivery over the next 36 hours, but the webhooks overview (checked 13 Nov 2026) is clear that webhooks don't provide a historical notification store. If an event never reaches you, there's no replay button. You can't fix this one. You can only catch it, which is what the rest of this post is about.
How to test a comments webhook properly
A second account, a fresh comment, and the raw request log
Log every POST before you act on it: timestamp, body size, and whether the signature passed. Then comment from a second, public account. Nothing in the log points upstream (causes 2, 3, 5). Arrived but rejected is cause 4. Accepted but missing in your app means your own filters (cause 1).
What a healthy delivery looks like
The shape differs by login type (the notification examples show both), so compare against the one for your setup. For Instagram Login, the value you care about looks like this, trimmed:
{
"field": "comments",
"value": {
"id": "<comment id>",
"from": { "id": "<instagram-scoped user id>", "username": "<username>" },
"text": "Is this still available?",
"media": { "id": "<media id>", "media_product_type": "<type>" }
}
}
Keep the comment id. It's the key that ties everything below together.
Why you still need a backstop when webhooks work
Even with all seven causes ruled out, events go missing: a deploy restarts the app between Meta's POST and your processing, a token refresh lands mid-flight, or Meta doesn't send one. Two things helped.
First, we persist the raw payload to a durable inbox table and only then return 200. Processing happens in a background service, and the row survives restarts and deploys, which our old fire-and-forget Task.Run did not.
Second, we poll. By default each Instagram account gets a sweep every five minutes. The webhook is the fast path; the poll is the safety net.
The polling backstop: one cheap call when nothing changed
The naive poll lists recent media and then fetches comments for every one of them. Our first version did that, and a comment in our code records what it cost:
// This loop used to fire one comments request PER MEDIA, every sweep,
// unconditionally: 25 media = 26 Graph calls a sweep. Measured on ONE account it came to
// 1,150 Instagram calls in a single hour, against the 200/hr budget this codebase states
That was at an older one-minute cadence. A word on the budget: 200 calls per hour is the number we plan against, and it's the Graph API platform formula (200 × users per hour). Most Instagram Platform calls (not messaging, Business Discovery or Hashtag Search) are actually counted under the Business Use Case limit, 4,800 × impressions per rolling 24 hours (rate limiting docs, checked 13 Nov 2026). Either way, 1,150 calls an hour for one account was not sustainable.
List recent media with comments_count
The media listing can return comments_count alongside each id at no extra cost, since it's a field on the same call:
GET /{ig-user-id}/media?fields=id,timestamp,comments_count,permalink&limit=25
Per the IG Media reference (checked 13 Nov 2026), comments_count includes replies on comments and excludes comments on album child media.
Only fetch comments for media whose count changed
var changed = new List<string>();
foreach (var (mediaId, commentsCount) in media)
{
// No count in the payload? Always fetch, so a payload change can't blind the poller.
if (commentsCount.HasValue &&
cache.TryGetValue<int>(CountKey(accountId, mediaId), out var lastSeen) &&
lastSeen == commentsCount.Value)
continue;
changed.Add(mediaId);
}
if (changed.Count == 0) return results; // quiet sweep: just the listing call
In steady state, a sweep is the one listing call and nothing else.
Cap the fetches per sweep so a cold start can't spike the quota
After a restart the baseline is empty, so every media looks changed. Without a cap that's a 25-call burst per account. We fetch at most 8 per sweep:
const int MaxCommentFetchesPerSweep = 8;
var toFetch = changed.Take(MaxCommentFetchesPerSweep).ToList();
Let the rotation correct itself
The baseline for a media is written only after its comments were read successfully:
// A failed or cancelled fetch must leave the old baseline in place, otherwise
// the media would be treated as "seen" and its new comments would never be picked up.
if (countById.TryGetValue(mediaId, out var fresh) && fresh.HasValue)
cache.Set(CountKey(accountId, mediaId), fresh.Value, TimeSpan.FromHours(12));
Media skipped by the cap keep their old baseline, so they still read as changed next sweep and get their turn. No cursor needed.
Where the baseline lives, and why losing it is fine
It's in IMemoryCache with a 12-hour TTL, not the database. Losing it on restart costs one extra sweep, which the cap already bounds, and it avoids a migration for what is really cache data.
Known blind spots
- Delete plus new comment between sweeps. The count stays the same, so the gate skips that media. A deletion on its own moves the count and only causes a harmless re-read.
- Posts older than the scan depth. We scan the newest 25 media. A new comment on an older post is invisible to polling. We raised this from 10 because accounts posting a few times a week were losing visibility on posts barely two weeks old. We deliberately don't filter the media list by date: a new comment can land on a months-old post, so the time filter belongs on comment timestamps, not on media.
One pipeline, two sources: dedupe so nothing is answered twice
Same store, same event id
Webhook events and polled comments both land in one table, keyed on (Platform, PlatformEventId), where the event id is the Instagram comment id from either source. The webhook processor checks incoming ids in one batch query per platform, and a unique index is the last guard:
catch (DbUpdateException ex) when (DbDuplicateKey.IsUniqueViolation(ex))
{
// Already stored (a poll or another delivery won the race): nothing is lost.
}
Coalesce duplicate variants inside one payload
Meta sometimes delivers the same item twice in one payload, through two different fields. If you dedupe by "first one wins", you can keep the variant with the empty sender name. We group by event id and keep the variant with the most sender data:
events = events
.GroupBy(e => (e.Platform, e.PlatformEventId))
.Select(g => g
.OrderByDescending(e => string.IsNullOrWhiteSpace(e.SenderName) ? 0 : 1)
.ThenByDescending(e => string.IsNullOrWhiteSpace(e.SenderPlatformId) ? 0 : 1)
.First())
.ToList();
Skip the account's own comments
Both paths drop comments where the sender is the connected account. On the webhook side the log line says why: Skipping self-authored ... event ... prevents auto-reply loop. Without it, every reply you post comes back as a new comment to reply to.
Stop asking for what Meta keeps refusing
A backstop that retries a refusal every five minutes forever burns quota for nothing.
Standing refusals: pause and re-check later
- Mentions refused with code 10 (permission not granted, per the error handling guide, checked 13 Nov 2026). Our code comment notes 70 such refusals from two accounts over three days in October. Now we pause mention fetches for that account for 6 hours, and comments and DMs carry on.
-
An Instagram DM conversation that won't load (code 100, subcode 33). It kept appearing in the conversation list, so every sweep asked again: 104 failed calls from two conversations in September. We skip it until a new message arrives. Then we found conversations whose
updated_timechanged on every sweep, so that skip never matched (58 failed calls a day from one conversation). Now two refusals in a row means a hard skip for 24 hours.
Back off on throttle codes
Codes 4, 17, 32 and 613 are throttling. Graph can return them inside an HTTP 200 body, so check for an error object even on success. We back off the account for 10 minutes on a failed send and record a short cool-off when a read comes back throttled. The rate limiting docs also list 80002 for the Instagram Business Use Case limit, worth handling alongside the others.
Troubleshooting checklist
- Test from a second, public account, never the owner.
- Confirm each account was enabled via
POST /subscribed_appswith the fields you need. - App is Live, with the comments permission and the access level the docs require.
- Hash the raw request body, and check every app secret that may sign it.
- Log every POST before verification, with the pass or fail result.
- Re-subscribe existing accounts when you add a field.
- Persist the payload, then return 200 and process in the background.
- Poll with a
comments_countgate, a per-sweep cap, and baselines written only after success. - Dedupe webhook and poll items on the same comment id, with a unique index behind it.
- Pause standing refusals and back off on throttle codes instead of retrying every sweep.
If you want to see this running behind a product, it's what powers comment replies in PersonaXpand.


Top comments (1)
We thought comments were missing until we found our endpoint was rejecting events signed by a second app secret. Our check only hashed one. Now we log which key matched. fwiw I built Webhook Relay and it stores the raw request so you can recheck it.