iOS - 使用Graph API获取Facebook好友

时间:2013-12-17 09:36:01

标签: ios facebook-graph-api

我想在iOS应用中使用Graph API从Facebook获取朋友列表。我正在收到好友列表。但关注的是我想分批获得它们,比如从A到F,然后从F到M等等。对此的任何帮助将受到高度赞赏。

以下是我用来获取朋友列表的代码段。

FBRequest* friendsRequest = [FBRequest requestWithGraphPath:@"me/friends" parameters:@{@"fields":@"id, name,first_name,last_name,link,username,gender,locale,picture,birthday,locations,checkins"} HTTPMethod:@"GET"];

[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
                                                          NSDictionary* result,
                                                          NSError *error) {
                NSMutableArray *array = [NSMutableArray array];
                NSArray *unsortedFriends = [result objectForKey:@"data"];
}
)];

0 个答案:

没有答案