Vote ONLY ONCE Button with Counter (Please Help!)

I’m trying to create a voting button
I would like the user to press the bomb button and the text show the number of time its been pressed but I want the user to only be able to vote once maybe if the IP address matches you say thank you for voting or you already voted is this possible? or how do I get it to where they can only vote one time? Please look at the picture below

I can show you an example

I saved a Database of objects like this

{
someText:”bla bla bla”,
Creator: firebaseUserId,
likedBy: [user2’sUserID, user5’sUserId]
}

When A user clicks like, The app checks to see if their userID is in the array of likedBy for that user. If not, it’s added

Then the number of Id’s in that array is used as the number of likes.

1 Like

do the user have to save their userID or is it automatically generated?

This is generated on login to Firebase and is returned by the login blocks

Alternatively you could use the user email, username, or any other unique identifier.

Could I create a unique identifer so voters dont have to log in? I could really use your help.

Also can you share with me the app you created this in?

Nope. You need a login system of some kind. That is how you will create a uniqueID. The IP is not reliable as a form of unique identifier.

You need to use something like Firebase (or backendless) for authentication.

https://x.thunkable.com/projectPage/5f74afe93ddbe4fba633cd87

2 Likes