facebook-ios-sdk requestWithGraphPath:@" me / friends" [英] facebook-ios-sdk requestWithGraphPath:@"me/friends"

查看:149
本文介绍了facebook-ios-sdk requestWithGraphPath:@" me / friends"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到关于这个sdk的任何基本文档(我只是愚蠢或在错误的地方看?)。我无法弄清楚这个方法是什么:

i can't find any basic documentation on this sdk (am i just being stupid or looking in the wrong place?). i can't work out what this method:

- (void)request:(FBRequest*)request didLoad:(id)result

如果是这样的请求,实际上会返回:

actually returns in the case of a request like this:

requestWithGraphPath:@"me/friends"

或者这个:

requestWithGraphPath:@"me"

结果似乎是一个nsdictionary,但我不知道在它等什么。

result seems to be an nsdictionary, but i don't know what to expect in it etc.

推荐答案

用以下代码确认

 if ([result isKindOfClass:[NSDictionary class]]) {
      NSLog(@"count : %d ", [result count]);
      NSArray* resultArray = [result allObjects];

      NSLog(@"count : %d ", [result count]);
      result = [resultArray objectAtIndex:0];

      NSLog(@"count : %d ", [result count]);
      result = [result objectAtIndex:0];

      [self.label setText:[result objectForKey:@"name"]];
  }

这篇关于facebook-ios-sdk requestWithGraphPath:@" me / friends"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆