我得到了Instagram的应用程序。 我火力点作为后端其中有:Firebase复杂查询 - iOS Swift
后节点 - 包含所有帖子来自不同用户 [POST_ID post_user POST_NAME POST_CONTENT]
问题: 我只想从得到的帖子我跟随的用户。
我的步骤:
我在阵列下面users_id列表
followersIds
我想知道如果我可以让查询像
getFollowersList { (followersIds) in print(followersIds) self.postRef.queryOrdered(byChild: "user").queryEqual(toValue: followersIds).queryLimited(toLast: limit).observeSingleEvent(of: .value, with: { (snapshot) in if snapshot.value is NSNull { completion(nil); return} else { let dict = snapshot.value as! [String:Any] self.mapDictionaryToArrayOfPost(dict: dict, completion: { (posts) in completion(posts) }) } }) { (error) in debugPrint(error.localizedDescription) } }
问题: 火力地堡不能接受queryEqual数组作为参数()
我可以在应用程序过滤做这个过滤器,但我想查询火力并得到结果。 因为在应用程序中过滤不是一件好事。
任何建议。