ACAccountStore から access_token を取得するには、以下のコードを確認してください。
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *FBOptions = [NSDictionary dictionaryWithObjectsAndKeys:FACEBOOK_APP_ID, ACFacebookAppIdKey,@[@"email"],ACFacebookPermissionsKey, nil];
[accountStore requestAccessToAccountsWithType:accountType options:FBOptions completion:
^(BOOL granted, NSError *error) {
if (granted) {
NSArray *facebookAccounts = [accountStore accountsWithAccountType:accountType];
FBAccount = [facebookAccounts firstObject];
NSLog(@"token :%@",[[FBAccount credential] oauthToken]);
} else {
//Error
NSLog(@"error getting permission %@",error);
if([error code]== ACErrorAccountNotFound){
NSLog(@"Account not found. Please setup your account in settings app");
}
else {
NSLog(@"Account access denied");
}
}
}];