简体   繁体   English

从Facebook获取我的朋友列表-iOS

[英]Get my friend list from facebook - iOS

I'm trying to get my friend list in facebook with the following code: 我正在尝试使用以下代码在Facebook中获取我的朋友列表:

  [FBRequestConnection startWithGraphPath:@"/me/friendlists"
                                 parameters:nil
                                 HTTPMethod:@"GET"
                          completionHandler:^(
                                              FBRequestConnection *connection,
                                              id result,
                                              NSError *error
                                              ) {
                              NSLog(@"result is %@",result);
                          }];

but the result is: 但结果是:

 data = ( { id = 200157003455826; "list_type" = acquaintances; name = Acquaintances; }, { id = 115504338587760; "list_type" = family; name = Family; }, { id = 115504328587761; "list_type" = "close_friends"; name = "Close Friends"; } ); 

How can I get the list of all my facebook friends? 如何获得我所有的Facebook朋友列表?

I resolved my problem with this code: 我用以下代码解决了我的问题:

  [FBRequestConnection startWithGraphPath:@"/me/friends"
                                 parameters:nil
                                 HTTPMethod:@"GET"
                          completionHandler:^(
                                              FBRequestConnection *connection,
                                              id result,
                                              NSError *error
                                              ) {
                              NSLog(@"result is %@",result);
                          }];

instead the other 代替另一个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM