# How to make a like/unlike system?

**URL:** <https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235>\
**Category:** Need help\
**Created:** [May 28, 2020, 5:44am UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235 "2020-05-28T05:44:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![swordsoftarchive](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/swordsoftarchive/32/62323_2.png) [@swordsoftarchive](https://forum.bubble.io/u/swordsoftarchive)\
**Post date:** [May 28, 2020, 5:44am UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/1 "2020-05-28T05:44:03Z")

</div>

I want to make a system where if you haven’t liked yet, you like a post, but if you have already liked it, it unlikes it. I’m trying to make it right now and it isn’t working, Please help

---

<div class="post-metadata">

**Author:** ![nachodip97](https://avatars.discourse-cdn.com/v4/letter/n/ecd19e/32.png) [@nachodip97](https://forum.bubble.io/u/nachodip97)\
**Post date:** [May 28, 2020, 6:51am UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/2 "2020-05-28T06:51:01Z")

</div>

here’s a way of doing it: add a list of users to the post’s data type that will be the list of liked users. then add a workflow on the like button: if button is clicked, only when user is not in current post’s list of liked users, then add: make changes to, current post, list of liked users add current user. then copy and paste this workflow and change the only when condition to say: only when user is in current post’s list of liked users. and then in the make changes to post, list of liked users remove current user. hope this helps

---

<div class="post-metadata">

**Author:** ![swordsoftarchive](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/swordsoftarchive/32/62323_2.png) [@swordsoftarchive](https://forum.bubble.io/u/swordsoftarchive)\
**Post date:** [May 28, 2020, 8:04pm UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/3 "2020-05-28T20:04:18Z")

</div>

i tried that but whenever i clicked the like button it removed the like as soon as i liked the post

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [May 29, 2020, 8:09pm UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/4 "2020-05-29T20:09:51Z")

</div>

@swordsoftarchive

The solution provided by @nachodip97 is the right one

> [@swordsoftarchive](#):
>
> i tried that but whenever i clicked the like button it removed the like as soon as i liked the post

You might have this issue if you’re testing in preview with a _sample:thing_ in the page URL  
If your page is of type Post you would need to create a dummy Post in App Data and include its unique id in the page URL

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [May 30, 2020, 1:54am UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/5 "2020-05-30T01:54:36Z")

</div>

Just FYI. 😊 This happens a lot. Just don’t put both steps in the same workflow. You have to copy the whole workflow and make it separate and only have the one step each. Otherwise it will run both steps. For example…

When press button:  
Step 1: Like \> Step 2: Unlike

Instead do this.

When press button and item is liked already:  
Step 1: Unlike

When press button and item is not liked already:  
Step 1: Like

> **Want to learn more?**
>
> [www.nocodeminute.com](http://www.nocodeminute.com)
> 
> ![Presenting](https://us1.discourse-cdn.com/bubble/original/3X/6/5/65f6fab3efed1c82ed9ceb6b067f755e0766996c.gif)

I hope that helps clarify things. I don’t want to make it more confusing. 😊

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [August 6, 2020, 5:44am UTC](https://forum.bubble.io/t/how-to-make-a-like-unlike-system/94235/6 "2020-08-06T05:44:07Z")

</div>

Closed on August 6, 2020, 5:44am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
