Issue
I've been trying to create an app that follows these three steps:
- Register via Facebook
- Create new user in Firebase database
- Allow registered users to see news articles and comment
I am stuck on #3. I'm not sure this is efficient, but I want to post articles on a site such as Wordpress or whatever and parse the JSON to the app. However, I do not know how to implement the comments.
Solution
You could have, in the Firebase realtime DB, a structure like:
[root]
-[article_urls]
-[comments]
-[comment_id]
-[content]->value
-[user_id]->value
etc. The interesting bit of the Firebase database documentation would be:
- best practice firebase database: ie, keep your data flat
- How to add data to a list in Firebase database: When you add a new comment to an article you are actually adding it to a list
Answered By - Sistr
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.