1

我正在为我的应用程序使用 parse.com。所以我有一个查询。我需要找到所有帖子对象。每个帖子都有一个作者栏。所以我需要找到附近位置的人的所有帖子。我使用这样的代码:

PFQuery *postsQuery = [PFQuery queryWithClassName:@"Post"];
PFQuery *locationQuery = [PFUser query];

[locationQuery whereKey:@"location" nearGeoPoint:geoPoint withinKilometers:3.0f];
[postsQuery whereKey:@"author" matchesQuery:locationQuery];
[postsQuery orderByDescending:kPostKeyDate];
[postsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {

}];

问题是我只得到当前用户的帖子,尽管周围有很多用户有帖子。有人可以提出解决方案吗?提前致谢。

4

1 回答 1

0

ОК!所以问题是我只为当前用户的帖子设置了 ACL。相当容易!

于 2014-07-30T06:23:06.883 回答