System of likes or hearts

Guys, I want to make a system of likes, so when I click on the image of the heart I add a 1 to the label that is next to it and when I click it again that 1 is removed, how can I do it?

1 Like

On image click

If tiny db value is 0
Then store tiny db value to 1
Get like values from database

Got value
Store value + 1
Set Label text to value

Else store tiny db value 0
Get like values from database

Got likes value
Store value - 1
Set label text to value

Use tiny db to check image is liked or not and online database like firebase to store total likes.


haaa literal friend I’m still scratching my head, can you express it in blocks?

like this: I liked value
Store ** value - 1 ** as did the -1? again, can you blocks please.

I want it to be added, the database will not always have 0 hearts.

Tomorrow …:grinning_face_with_smiling_eyes:

hahaha come on, you will not delay, nothing is that I need it urgently :smiley:

Sorry but It’s 12am here, my laptop is shut down and i am going to bed. :sleeping:

Give him friend, no problem, I understand, I wait for your answer tomorrow :smiley:

1 Like

1st Way


2nd Way


Friend can I use label you must from global variables? is that global variables do not work for me and I always prefer to work with label

can u plz send me aia which includes these blocks

In my case I could not because it is a private project, but soon the friend Srrazmi can pass you the project .aia

I just need firebase block in image above if u dont mind can u share png of firebase (2nd method )block

It Was Just for Example You Can Use Lable Or Online Methode Or Any Other Method To Perform This Action

sorry i didn’t understand u are also using label in it and firebase is also an online method i f u dont mind can u briefly explain your point

The Label Is Just For Showing Data You Can Use Label Inside Variables

I have Answered Of This Question

ok the blocks you have shown in 2nd way can i use these blocks to make like heart function workable in my app or i have to follow or write something else

1 Like

Yes You Can Make It

ok thats why i was asking you to plz provide png of that block i will import it also it will save my time and effort

There Is Best Way To Make Yourself It Will Be Remind You

Don’t Go Off-Topic Community Is Not Allowed It, Ask In PM

1 Like