Facebook iOS 6 - get user info

Is it possible to use the built-in iOS 6 Facebook integration to get the user's basic info (email address, birthday, etc)? All of the documentation/examples I have seen use the iOS 6 integration to simply open an SLComposeViewController.

Thank you for your time.


Please check out my sample project. It allows you to upload video to Facebook, but it also includes a method to get your info, you should look at the file ViewController.m, the one noted "Native" in the tab controller.


You will need to import the Social and Accounts frameworks to do what you want. You request access to the users Facebook account from the ACAccountStore, if you are granted access, then you use this account to create an SLRequest with the parameters you want, here you want the graph object "/me".


@property (nonatomic, retain) ACAccountStore *accountStore;
@property (nonatomic, retain) ACAccount *facebookAccount;


- (IBAction)getMeButtonTapped:(id)sender {
        _accountStore = [[ACAccountStore alloc] init];

    ACAccountType *facebookTypeAccount = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

    [_accountStore requestAccessToAccountsWithType:facebookTypeAccount
                                           options:@{ACFacebookAppIdKey: @"483616868329082", ACFacebookPermissionsKey: @[@"email"]}
                                        completion:^(BOOL granted, NSError *error) {
                                                NSArray *accounts = [_accountStore accountsWithAccountType:facebookTypeAccount];
                                                _facebookAccount = [accounts lastObject];

                                                [self me];
                                                // ouch
                                                NSLog(@"Error: %@", error);

Get "me":

- (void)me{
    NSURL *meurl = [NSURL URLWithString:@"https://graph.facebook.com/me"];

    SLRequest *merequest = [SLRequest requestForServiceType:SLServiceTypeFacebook 

    merequest.account = _facebookAccount;

    [merequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSString *meDataString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];

        NSLog(@"%@", meDataString);




 self.facebookDownload = [JNFacebookDownload new];
 self.facebookDownload.appID = @"380637545425915";

[self.facebookDownload downloadInformation:^(NSDictionary *userInfo, NSError *error) {

    dispatch_async(dispatch_get_main_queue(), ^{

        if (error)
            if (error.code == JNFacebookDownloadNoAccount)
                NSLog(@"No account");
            else if (error.code == JNFacebookDownloadNoPermissions)
                NSLog(@"No permissions");
            else if (error.code == JNFacebookDownloadNoAPPID)
                NSLog(@"No APP ID Configured");
            self.textView.text = [userInfo description];

Need Your Help

Why there are no themes for swagger-ui?

themes swagger swagger-ui

I like swagger for documenting Restful APIs very much, especially "Try it out!" button, but swagger-ui interface doesn't look very cool.

What is intent of ID Token expiry time in OpenID Connect?

oauth-2.0 openid-connect

In OpenID Connect an access token has an expiry time. For authorization code flow, this is typically short (eg 20 minutes) after which you use the refresh token to request a new access token.