Functionality relies on the post creation endpoint.
Sometimes you want to create a post with a first comment automatically posted once your post is published. This is useful for example to add external links without compromising your post's reach, or to create artificial "engagement" to get the post more visibility.
In order for this to work, you need to create the post with the containers field, and include the comment as the first container.
For example, this is a simple post without a comment:
{ "content": "This is a comment", ....}
Skip using the content field and use the containers field instead, for both the post and the comment:
{ "containers": [\ {\ "content": "This is the post content",\ },\ {\ "content": "This is a comment",\ }\ ]}
When the post is published, the comment will be automatically posted as a reply to the post.
Comments can include media attachments, just like posts.
{ "containers": [\ {\ "content": "This is the post content",\ },\ {\ "content": "This is a comment",\ "media": [\ {\ "url": " }\ ]\ }\ ]}
Delete & cancel a post DELETE\ \ Previous Page Publish a comment POST\ \ Next Page
Create a first comment
Sometimes you want to create a post with a first comment automatically posted once your post is published. This is useful for example to add external links without compromising your post's reach, or to create artificial "engagement" to get the post more visibility.
In order for this to work, you need to create the post with the
containersfield, and include the comment as the first container.For example, this is a simple post without a comment:
Skip using the
contentfield and use thecontainersfield instead, for both the post and the comment:When the post is published, the comment will be automatically posted as a reply to the post.
Comments can include media attachments, just like posts.
Delete & cancel a post DELETE\ \ Previous Page Publish a comment POST\ \ Next Page