Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+11 votes

I'm trying to implement a "likes" function for a social media application and was wondering if anyone has any good ideas for storing which users have liked the post...

asked in CSC490_Spring202021 by (2.6k points)

2 Answers

+3 votes

I will recommend you store them like documents in the collection (inside firebase firestore), add a field name like or not like (boolean), I hope this help

answered by (2.2k points)
+2 votes

Are the posts being saved in a collection where each post is a different document? If so, maybe just add a field on the posts that saves the user IDs of people that like the post.

answered by (2.2k points)
...