X
X
xxx44yyy2019-05-23 08:25:57
Ruby on Rails
xxx44yyy, 2019-05-23 08:25:57

Has anyone found an implementation of facebook voting emotes?

I want to do things like Facebook for blog posts. But I can't find a ready-made solution anywhere. Maybe someone met? Ideally, this should be in conjunction with acts_as_votable. I can write it myself, but I'm looking for a ready-made solution.
1_F0kZE_iqJrsXZHCkejRJOA.0.0.png
They are called reactions, right?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
Oleg Pravdin, 2019-05-23
@opravdin

As I see it, you create an enum with types of reactions (0 -like, 1 - love, etc.), in the database you create a link table with columns user_id, post_id, reaction (uniqueness for the first pair of keys). When opening a post, load from this table all likes by post_id + user_id, grouping by reaction with COUNT counting. In the backend, make an /ajax/react handler and send reaction_id, post_id there depending on the button pressed and update the link table according to this data.
UPD: I didn't read that you are looking for ready-made

E
Evgeny Zaletsky, 2019-05-23
@JZ_52

So, why do you need ready-made options?

I
ipswitch, 2017-05-26
@ipswitch

The flash drive dies most likely.
Try this:
comp-profi.com/view_post.php?id=127
If it didn't work out, you can't help the archive with a new flash drive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question