Reaction buttons for posts

Question: How hard would it be to add reaction buttons to posts (maybe only a single option like a thumbs up or heart), and then display the total somewhere beside the title or the excerpt?

Obviously, you’d have to store the data somewhere in the database. But I wouldn’t think it would be too big a deal.

I’m trying to increase engagement with the stories on our site. (Also working on getting more comments.)

Thoughts?

1 Like

In case you don’t know, you can use Applause button as a workaround: https://applause-button.com

I think reaction feature should be considered as part of comments module, including collecting reactions on other platforms like Social Web or Bluesky. I believe this will eventually come to the table in the feature, also to make Social Web more functional.

1 Like

Thank you for the tip! I was excited to try out the Applause button, as it was exactly what I was looking for.

Unfortunately, in digging around in the Github repository, there was a note that the backend was no longer supported, and you would have to host it yourself. Since I don’t have access to my site’s back end, I could not set that up myself, and setting up another droplet just to have the Applause button was not something I was interested in. So, back to square one.

But, again, thanks for the tip!

Hmm, sorry I missed that they don’t provide a backend anymore. Maybe I can consider providing a backend via Synaps Media. I’ll look into it.

I forked the backend server, renovated it (it was a very old, AWS based solution), and released at applause.synaps.media address.

You need to point this server as api attribute of the component, like:

<applause-button api="https://applause.synaps.media"></applause-button>

And don’t forget to put required JS and CSS files as well (either in code injection, to header, or to the same place you put your button)

Give it a try. Backend is very lightweight. I can donate some of my server resources for more applauses to content creators :blush:

3 Likes

Excellent! Will give it a try.

One question: How do I show the claps beside the title on a story list so that it is read-only (you can’t clap from just the title).

Thanks again!

That will require running extra JS codes. A JavaScript code should fetch clap counts for all post urls on the page, then put those numbers next to the title. And this can vary to the themes.

Thanks for your effort on this! I took a look at the API docs, and I’m not sure I feel comfortable coding the GET for the clap number into my site’s code. I could easily get the Clap button on the individual posts – but without being able to show the total counts on the front page, I’m not sure it is that useful. (Obvs, my goal is for people visiting to see what other people thought was worth their while.)

Seriously, thanks.

1 Like

Late to this but wanted to add a couple of things since we have had this exact conversation with a client recently.

The Applause button is a solid option if you can self-host the backend - the fork @muratcorlu linked is genuinely nice. For clients who do not want another server to maintain, there is also a lightweight approach using Tally or even a simple iframe embed pointing to a Typeform with a single thumbs-up question. Hacky, but zero infrastructure.

The other thing worth knowing: Ghost’s native comment system (if you have it enabled) actually gives you a hearts/likes layer built in for comments, which is not quite what you are asking for but does surface some engagement signal without any extra plumbing.

What worked for us on a client site was combining two things: a simple “Did you find this useful?” Yes/No at the bottom of each post (done via a Tally embed) and making sure the comment section was open and visible above the fold. The Tally form collected the data to a spreadsheet, the client got a weekly digest. Not the most elegant solution, but it took about 45 minutes to set up and the client was happy.

If you want something that actually displays a running like count on the post cards in the index, that requires a bit more work - you would need a custom theme modification and external storage. Worth it for some publications, overkill for others. What is the site’s setup? Managed Ghost Pro, or self-hosted?

2 Likes

Hah – now I’m having second thoughts about putting the clap count on the story list. :rofl: I am worried that, rather than encourage people to read a story, seeing a low clap count would discourage them from reading. Ah, the troubles of the solopreneur! :wink:

I’m going to consider your solution, possibly along with a few other ideas. This discussion has revealed to me that I have more than one goal here, and I need to step back and clarify better what I want to achieve.

Thank you all for your input! And thanks to @muratcorlu for the work to fork the Applause button and provide a back end for it!

1 Like

An update: I decided to implement the Applause button at the end of posts, using your graciously-provided back end. Other than working out the styling, it is working as expected.

I turned on the multiclap feature, and it is allowing me to do more than one clap on a visit to page. However, when I come back to the page, it only persists the first clap of a visit. (I went to the page the first time and did five claps, then went back and did six more, but the button is only showing 2.)

Is there something I need to change?

And almost finally – Is there a way I can pull the claps per article from the back end? Or would I need to just visit each article and check?

And finally – where can I donate for your work on this?

Hi Bruce,

I’m glad you found it useful for your site. Regarding to your questions:

I tried to keep my server implementation as a drop-in replacement of the original one. I’ll check if there is a catch or a bug on multi-clap behavior.

For fetching clap counts there are /get-claps end /get-multiple endpoints. Usage information about them are provided at the end of Applause Button home page, under “Developer API” title.

Thanks for your kind offer. No need for a donation. You can give a link to my hosting service somewhere, if you would like to support me. But just if you want to. :blush:

1 Like

I thought the button maintained the total clap count for a given page out of the box. (That’s how it looks on the original site, in the code.)

So, if I want the button to display total claps, I need to add some other code? (Or are you referring to me wanting to get applause for all pages?)

Ah, yes.I thought you want to see applause counts for all pages. Button component already requests to get-claps endpoint to show number for current page.

I’ll see if I can figure out a way to pull the total counts.

But my issue right now is that I’ve got multiclap turned on, and the button is letting me do more than one when viewing the page – but when I come back, it only persists the first one, as if multiclap was not on.

It’s not a HUGE deal – but if readers really like a particular article, I’d like for them to be able to show it. (Like on Medium.)