Repository navigation
Add first comments to Instagram posts and Reels - #539
Open
paulocastellano wants to merge 16 commits into
Open
paulocastellano wants to merge 16 commits into
paulocastellano wants to merge 16 commits into
Conversation
added 16 commits
November 23, 2026 11:37
- Measure a reply the same way in the reply field and the composer card (replyDisplayText), and read stored replies with null text or media. - Move the comment text mirror to lib/plainText.ts as a step-by-step copy of ContentSanitizer::plainText(), covered by PlainTextParityTest. - Say "Comments are not available" instead of the thread copy when a network's comments are off (posts.form.thread.comment_unsupported). - End an Instagram post that went live without a media id as published without its comment, with a warning on its card, instead of failing it. - Add Post::contentTypeOn() for the type resolution repeated in three places, and document first comments in AGENTS.md and .env.example.
- Treat a pending first comment as unconfirmed only while no comment id was checkpointed, so a stuck post whose comment went out times out instead of asking to check the comment, and posts:retry always drops the pending flag. - Refuse a retry with a pending comment and no checkpointed post with the unconfirmed copy, and drop the unused comment_media_unconfirmed key. - Say "one comment" again in the list-content-types tool description.
Web, API and MCP refuse a second comment, a comment with media and a comment over 2,200 characters with the same field and message.
The reply field's own counter reads the comment as the publisher sends it, so entities that decode to fewer characters no longer mark it over the limit.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
meta.thread_repliescontract as the API and MCP.Meta permissions
instagram_business_manage_commentsinstagram_manage_commentsInstagram Login asks for
instagram_business_manage_commentsby default, so first comments are on there; an explicitINSTAGRAM_SCOPESlist can leave it out to turn them off. Facebook Login does not ask forinstagram_manage_commentsby default, so first comments stay off there untilINSTAGRAM_FACEBOOK_SCOPESadds it once Meta grants access.The endpoint reference lists a Facebook User token. The moderation guide lists a Page token for its flows, and TryPost stores a Page token for Facebook Login. Validate creation with that token in a Meta test account before enabling the feature in production. Meta documents an additional Ads permission for some Page roles granted through Business Manager. Media comments reference · Comment moderation guide
Verification
Manual checks
instagram_manage_commentstoINSTAGRAM_FACEBOOK_SCOPES, publish a Reel with a first comment and confirm the Page token works and the comment appears once.