How does the follow user part work like in Instagram?

陌路散爱 提交于 2020-06-16 04:18:11

问题


I have two firestore collections in my app, "users" and "posts". Now I'm trying to create the third collection "userFeed" where all the posts of the followed users can be stored. How can i follow the users like in Instagram so that all the followed users' posts are stored in the 'userFeed' collection? How to query for following a user in a way that his future posts appear in the current user's 'userFeed'?

All the users have to sign with firebase auth so all users have a UID. How do i make the follow user query?


回答1:


I believe the same concern was raised and addressed in this post. Although the response was in Javascript, the basic principle is the same.



来源:https://stackoverflow.com/questions/62194361/how-does-the-follow-user-part-work-like-in-instagram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!