Adds or removes the current user reaction on a post and returns the updated count — a second route onto the same behaviour as the reactions toggle endpoint.
This path is served by the comments controller rather than the reaction controller, but the logic is duplicated line for line: same react_type handling, same remove flag, same response. New integrations should prefer POST /feeds/{feed_id}/reactions/toggle.
Endpoint
Method:
POSTPath:
/feeds/{feed_id}/reactEdition: Core
Controller:
CommentsController@addOrRemovePostReactRoute source:
fluent-community/app/Http/Routes/api.php:56Controller source:
fluent-community/app/Http/Controllers/CommentsController.phpRequires a signed-in user, and the post must be published.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
POST Toggle Feed Reaction
Adds or removes the current user reaction on a post and returns the updated count — a second route onto the same behaviour as the reactions toggle endpoint.
Controller: CommentsController@addOrRemovePostReact
Route source: fluent-community/app/Http/Routes/api.php:56
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Feed ID extracted from the URL path.
Request Body
Responses
Successful response