You would need to make a plugin to listen for a socket event, and in the widget js send the needed data to verify the request server-side. After adjusting the reputation and sending the new rep back, you probably want to make a db key to record the last action taken, such as how core uses pid:x:upvote