XF 2.2 Reacting via API

Dannymh

Active member
I am implementing a system that manages content across multiple sites using the API. SO members of Site A can make a post on Site A which gets copied to site B via an API user.
The aim here is to not have individual keys for every user but instead have the content pushed via a single user with the OP's details being pushed into the message.

This all works fine, however I am now trying to add reactions to this across the site, but am hitting the wall that if I send in a reaction, the reaction is always going as a single user and thus reacting to the content that goes across wont work and a user can only react to content once.

I am wondering about whether there is a way to possibly have this changed as the implementation of an API react seems to be counter to the actual react system in that reactions are a 1:1 relationship but the API is generally a many:1 relationship.

Otherwise is there some other way that may allow me to get around the issue to allow me to push multiple reactions through an API call as the single user?
 
The short answer is that what you're wanting to do is fundamentally not supported by XF. Reactions are always tied to a specific user, so if you always using the same user in your API requests, you can only have one reaction.

The alternative would be to user a super user key so you can change the user based on who is taking the action, but this may not be viable. Beyond that, you'd be deep into custom development territory.
 
The short answer is that what you're wanting to do is fundamentally not supported by XF. Reactions are always tied to a specific user, so if you always using the same user in your API requests, you can only have one reaction.

The alternative would be to user a super user key so you can change the user based on who is taking the action, but this may not be viable. Beyond that, you'd be deep into custom development territory.
Thanks Mike, that was my conclusion today. Tried every which way I could including guests and direct entry.

Might be worth folding this back from the API though as most I plemebtstions are going to be content between sites but users likely won't exist in both sites.

I'll look at a custom solution for this one though where reactions in a specific thread are pushed to a subsystem

The scanario I'm trying to avoid is having users exist in both systems and the context is that the group using this are 4 fansites of a sport where we have specific threads where we can chat about the week but not have other access to the sites. It's a unique edge case but a fun implementation so far
 
Back
Top Bottom