Here is my code. but it got failed and not grant me to do further process. let me know what is wrong in this.
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[accountStore requestAccessToAccountsWithType:accountType
options: @{ACFacebookAppIdKey: @"640154745965666",
ACFacebookPermissionsKey: [NSArray arrayWithObjects:@"email", nil],
ACFacebookAudienceKey: ACFacebookAudienceFriends
}
completion:^(BOOL granted, NSError *error) {
if(granted){
NSLog(@"granted");
}
else {
NSLog(@"fail ");
}
}];