从iPhone应用程序获取Facebook好友列表
有没有什么方法或代码片段可以让我从iPhone应用程序中获得facebook用户iPhone SDK的好友列表从iPhone应用程序获取Facebook好友列表,iphone,objective-c,facebook,Iphone,Objective C,Facebook,有没有什么方法或代码片段可以让我从iPhone应用程序中获得facebook用户iPhone SDK的好友列表 谢谢。我希望这会对你有所帮助 //try this code - (void) getFriendName :(id) sender { self.modeString = @"friendName"; NSString * query = [NSString stringWithFormat:@"SELECT name FROM user WH
谢谢。我希望这会对你有所帮助
//try this code
- (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];
}
除此之外,你还可以从中学到很多东西
我希望这可能对您有所帮助
//try this code
- (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];
}
除此之外,你还可以从中学到很多东西
这可能对您有所帮助
//try this code
- (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];
}
这可能对您有所帮助理论上可以回答问题,但此处包含答案的基本部分,并提供链接供参考。理论上可以回答问题,但此处包含答案的基本部分,并提供链接供参考。
//try this code
- (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];
}