how to fetch data in firebase by user id [closed]Adding Mobile Number based login mechanism for auth user in firebaseAndroid Firebase realtime database not workingHow to retrieve data and specific user data from the FirebaseFirebase email authentication add username and details to firebase databaseAndroid Firebase .Adding data to specific users Firebase databaseHow to send data from Firebase storage to an email address?Ensuring third party cannot read data in our Firebase Realtime DatabaseIdentify firebase auth and database query timeout in react nativeHow to add child to a List in Firebase Realtime Database with a cloud function?How to stop multiple Firebase events callback on(Value,snapshot)
What happens if you roll doubles 3 times then land on "Go to jail?"
How to be diplomatic in refusing to write code that breaches the privacy of our users
Can the discrete variable be a negative number?
How do I go from 300 unfinished/half written blog posts, to published posts?
How does the UK government determine the size of a mandate?
Purchasing a ticket for someone else in another country?
Customer Requests (Sometimes) Drive Me Bonkers!
Applicability of Single Responsibility Principle
India just shot down a satellite from the ground. At what altitude range is the resulting debris field?
Why are there no referendums in the US?
Is there a korbon needed for conversion?
Do the temporary hit points from the Battlerager barbarian's Reckless Abandon stack if I make multiple attacks on my turn?
What is the opposite of 'gravitas'?
Do sorcerers' Subtle Spells require a skill check to be unseen?
Is there a good way to store credentials outside of a password manager?
Sequence of Tenses: Translating the subjunctive
Implement the Thanos sorting algorithm
Unreliable Magic - Is it worth it?
What does 算不上 mean in 算不上太美好的日子?
How does buying out courses with grant money work?
What is the best translation for "slot" in the context of multiplayer video games?
Failed to fetch jessie backports repository
Escape a backup date in a file name
Would this custom Sorcerer variant that can only learn any verbal-component-only spell be unbalanced?
how to fetch data in firebase by user id [closed]
Adding Mobile Number based login mechanism for auth user in firebaseAndroid Firebase realtime database not workingHow to retrieve data and specific user data from the FirebaseFirebase email authentication add username and details to firebase databaseAndroid Firebase .Adding data to specific users Firebase databaseHow to send data from Firebase storage to an email address?Ensuring third party cannot read data in our Firebase Realtime DatabaseIdentify firebase auth and database query timeout in react nativeHow to add child to a List in Firebase Realtime Database with a cloud function?How to stop multiple Firebase events callback on(Value,snapshot)
I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
here is my code :
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends')
.on('value', (snapshot) => );
);
firebase react-native firebase-realtime-database firebase-authentication
New contributor
closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
here is my code :
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends')
.on('value', (snapshot) => );
);
firebase react-native firebase-realtime-database firebase-authentication
New contributor
closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
here is my code :
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends')
.on('value', (snapshot) => );
);
firebase react-native firebase-realtime-database firebase-authentication
New contributor
I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
here is my code :
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends')
.on('value', (snapshot) => );
);
firebase react-native firebase-realtime-database firebase-authentication
firebase react-native firebase-realtime-database firebase-authentication
New contributor
New contributor
edited Mar 21 at 15:55
Doug Stevenson
82.6k1099117
82.6k1099117
New contributor
asked Mar 21 at 15:53
hMediahMedia
13
13
New contributor
New contributor
closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you have not already, you need to split the information regarding each user into subcollections.
For example: friends > user_1 > email, name, age......
Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
.on('value', (snapshot) => );
);
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you have not already, you need to split the information regarding each user into subcollections.
For example: friends > user_1 > email, name, age......
Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
.on('value', (snapshot) => );
);
add a comment |
If you have not already, you need to split the information regarding each user into subcollections.
For example: friends > user_1 > email, name, age......
Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
.on('value', (snapshot) => );
);
add a comment |
If you have not already, you need to split the information regarding each user into subcollections.
For example: friends > user_1 > email, name, age......
Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
.on('value', (snapshot) => );
);
If you have not already, you need to split the information regarding each user into subcollections.
For example: friends > user_1 > email, name, age......
Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:
componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
.on('value', (snapshot) => );
);
answered Mar 21 at 17:31
Troy MyersTroy Myers
227213
227213
add a comment |
add a comment |