我有一个要求,比如需要获取正在使用我的应用程序的朋友。与 Instagram 应用程序相同 从 Facebook 查找朋友。
我知道这是提供朋友列表的代码。
- (void) getFriendName :(id) sender {
self.modeString = @"friendName";
NSString * query = [NSString stringWithFormat:@"SELECT name FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2=me())",appDelegate.friendList];
NSLog(@"query :%@",query);
// NSString * query = [NSString stringWithFormat:@"SELECT uid, first_name, last_name, birthday_date, sex, pic_square, current_location, hometown_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND strlen(birthday_date) != 0 ORDER BY birthday_date",appDelegate.friendList];
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
query, @"query",
nil];
[_facebook requestWithMethodName:@"fql.query"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
}
在这些好友列表中,我怎样才能只检索使用我的应用程序的好友?