Counting the number of likes

Hello, the user can like a part and show the number of likes for that part, for example 2 or 10 or.... For example, if two users like in two separate programs, the third person should see the number 3 when he likes.

Like the likes of a YouTube video

Show us what you've tried so far (blocks).

What block can I build when I can't?

I mean a shared space between everyone who has my app

For example, if the user clicks a button, I want everyone in my app to know how many people press this button.

Use an online database

Which block is it?

It depends on which database you want to use. Firebase, google spreadsheet, cloudDB, baserow, airtable ..... etc

1 Like

I want to make something like likes on youtube videos that shows how many people have liked.


Where is the problem, friends?

Try this

Favorites.aia (4.7 KB)

If you use Firebase, it has an incrementing server value, so you do not have to call back an existing value to add 1.

1 Like

veryyyyyyyyyyyy :smiley: :smiley: :smiley: :smiley:yyy good

If you are worried about individual users liking the same item multiple times, you would have to change to a more detailed tag/value structure and count the length of taglists:

  • LIKES
    • ABG app1
      • Moe: true
      • Larry: true
      • Curly: true
      • Shemp: true
      • Curly Joe: true
    • ABG App2
      • Moe: true
      • Groucho: true
      • Harpo: true

In this structure, the act of liking one of the apps consists of setting the value true to tag /LIKES/appname/username

If the same user tries to like the same app again and again, he will just be overwriting his previous tag/value entry.

To get all the users who liked an app, set the ProjectBucket to /LIKES/appname and take a TagList. When the TagList arrives, take its list length.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.