I want to make user profile like Instagram, the user can make his profile public or private in the settings, how data structure would be in this case?
Asked
Active
Viewed 745 times
1 Answers
1
Remember - users will have only the level of access that you define in your app.
You can have a field within the profile setting for public / private, and when you retrieve the list of profiles, filter for public only
There are many ways you could implement this, but here's an example of how you might structure your data
and then you just need to return all public profiles to your users
With this approach you would need to make sure you move records between private and public when you move them. Alternatively, you could have them all in one tree with an addition index on visibiity, and query based on that field

Russell
- 5,436
- 2
- 19
- 27
-
how the data in firebase look like ? pls give me an exmeple with fake data – Bensalem Ilyes Feb 02 '17 at 09:11