ColinEberhardt / applause-button

A zero-configuration medium-style button for adding applause / claps / kudos to web pages and blog posts
http://applause-button.com/
MIT License
428 stars 41 forks source link

BUG: Counting with url attribute doesn't work #20

Closed rolandschuetz closed 5 years ago

rolandschuetz commented 5 years ago

I want to use the clap buttons to vote for different options on the same page. Therefore, I would use the url parameter as a unique id.

<applause-button url="https://example.com/test/option-c4ac1f14-0079-4ceb-8b5b-a4517b480180" />
<applause-button url="https://example.com/test/option-574fdad7-b12d-4fce-b92c-ba421edccfff" />

This leads to miscounts all the time, it seems like the url parameter is ignored both in post and get responses. Demo

ColinEberhardt commented 5 years ago

I've double-checked, and as far as I can tell this functionality still works fine in the latest release. Take a look at this example:

https://codepen.io/ColinEberhardt/pen/xMjgVr

rolandschuetz commented 5 years ago

@ColinEberhardt Is it possible that my votes are blocked?

The first time I voted a single vote was counted. But now with different browsers and a different IP it never counts the vote. Demo 2

ColinEberhardt commented 5 years ago

One thing to bear in mind when testing the applause button is that there is a 2 second pause between the user clicking the button, and the HTTP request that records the updated clap count. This 'debounce' is used to collect 'multi claps' into a single request.

From your video, I can see that you are clicking and refreshing immediately.