如何使用Facebook Graph API和facebook ios sdk获取完整的用户对象?

我正在使用Facebook iOS SDK和Facebook Graph API。 当我请求“我”,这应该返回当前用户的所有属性,我只是实际上获取用户对象的一小部分。 我究竟做错了什么?

我login时也没有收到“允许/不允许”对话框,但也许是因为我是应用程序所有者?

在我的标题中:

#import <UIKit/UIKit.h> #import "Facebook.h" @interface FacebookAppViewController : UIViewController <FBRequestDelegate, FBDialogDelegate, FBSessionDelegate> { Facebook* facebook; NSArray* permissions; IBOutlet UILabel* JSONLabel; } @property (retain, nonatomic) UILabel* JSONLabel; - (IBAction)login:(id)sender; - (IBAction)logout:(id)sender; @end 

在我的实现中:

 #import "FacebookAppViewController.h" static NSString* apiKey = @""; // with my app ID @implementation FacebookAppViewController @synthesize JSONLabel; - (IBAction)login:(id)sender { [facebook authorize:apiKey permissions:permissions delegate:self]; } - (void) fbDidLogin { [facebook requestWithGraphPath:@"me" andDelegate:self]; } - (void)request:(FBRequest*)request didLoad:(id)result { NSString* uid = [result objectForKey:@"id"]; if ([result isKindOfClass:[NSDictionary class]]) { NSString* text = @""; NSDictionary* hash = result; for (NSString* key in hash) { text = [text stringByAppendingFormat:@"\n%@: ", key]; NSObject* value = [hash objectForKey:key]; if (value == nil) { NSLog(@"value is nil"); continue; } if ([value isKindOfClass:[NSString class]]) { NSString* str = value; text = [text stringByAppendingFormat:@"%@", str]; } JSONLabel.text = text; } } } - (void)viewDidLoad { [super viewDidLoad]; facebook = [[Facebook alloc] init]; } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { permissions = [[NSArray arrayWithObjects:@"read_stream", @"offline_access", nil] retain]; } return self; } 

使用fields参数和任何logging的用户字段。 @ “我?场= ID,姓名,性别,…”