Profile cover photo
Profile photo
Waseef Akhtar
111 followers -
I'm an artist.
I'm an artist.

111 followers
About
Waseef's posts

Post has attachment

Post has attachment

Post has attachment

Post has attachment

I have a question that I've been wanting to get answered:

I'm working on a social network app using Firebase Realtime Database. I want to know how to make a rule such that a user can only see their own posts, and posts from their followings in the Feed; like Instagram or Snapchat.

I have a Friendships node where I set up connections between users, Posts node for all the posts, and Users node for all the users

And here's how I tried to define the rule that gives me 'permission denied':

"posts": {
".read": "root.child('friendships').child(auth.uid).child('user_id').val() === true",
".write": "auth != null"
}

#AskFirebase

Post has attachment
Photo

Post has attachment

Post has attachment
Wait while more posts are being loaded