Facebook "Like" Mechanics

Hello and Merry Christmas!

Everyone knows how Facebook works: if you like post one time it’d be impossible to do it second time.
The question is: how to reproduce such mechanics within Bubble?

I suppose there should be a way to add a field to an entry (i.e. the same a post in FB), which would contain e.g. all id’s of Users who liked it. And then add conditionality to the Like button. But unfourtunately all my attempts to reproduce this concept failed.

Yes, you are on just the right track there.

Add a list of users to the thing you want to allow voting on.

(This is probably over complicated for what you need to do, as it allows up vote and down vote).

Then you only allow a “vote” when the thing’s user list doesn’t have the current user in.

However, if this user hasn’t voted, then you add the user to the list.

Hopefully this gives you a pointer, but happy to build in the forum app if not.

You can also “grey out” the function when you have already voted, but adding some conditional logic.

As a simpler alternative to using a condition on the workflow, you could make the element unclickable using the same condition as above.

You might want to also think about “unliking” something…so if they have already liked, they can click again to undo.

7 Likes

Hi, Nigel

Thank you very much.
It helped sovled more than one problem)

1 Like

How would you do this without using the references generated by cells?
Like if you only had a single post, or single cell?

Hi James,

Can you please describe your use case in more detail?

Nigel - you’re fantastic - thanks for all your contributions to this forum!!

3 Likes

Hello,
Thanks a lot for this contribution !

I am worried about the number of workflows count just for a voting system |
Each Vote count 1 workflow so the linit will be rich quickly in my case !
If the user unlike/relike/unlike/relike your Limit Monthly is burned ?
Exemple:
Just by using the voting system of all the bubble app, using it, present on builtonbubble.com ; i will burn their workflow’s limit and push them to take a dedicated server ?

Sorry if i understand nothing about how workflow are count or wich size represent each Plan in the reality !
The count of workflow in log is the number of workflow run in total but not the total of worflow using data , so , how can i know the real number of workflow count for the limit ?