Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+12 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 (1 point)

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 (1 point)
+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 (1 point)
...