Answer the question
In order to leave comments, you need to log in
How to implement a friend adding system?
I am writing here my next facebook for the sake of studying :D and wondering how to properly implement the friend adding system.
As I understand it in my head, I have a user model, each user has a unique ID, make an additional in the user model. the field (array) in which I will push the ID of the user being added by clicking on adding to friends, as a result, an array with IDs will accumulate, if everything is clear so far, then I don’t know how to fetch the posts of all these users later.
For the first time I write a backend in general, before that I learned to typeset, if it’s not difficult, share your thoughts on how you would implement it all step by step (not that part)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question