One of the strengths of WordPress is the commenting system. In previous lessons, we have seen how to get the comments alongside the posts.
In this lesson, will use Application Passwords, a WordPress plugin that allows authentication via non-interactive systems (in our case, using REST API) to provide authentication when posting a comment.
Using the auth functionality provided by our API client, we'll POST
to Posts comments, resulting in a comment associated directly to the HTML of the post.
There are different strategies for publishing comments. The first one is approving and triggering a build using WebHooks. The alternative is using a third-party system, something like DISQUS. But the benefit of keeping the comment directly associated with the HTML is that it becomes indexable and searchable.