Here is my code to login with facebook :
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *options = @{ACFacebookAppIdKey : FACEBOOK_APP_ID,
ACFacebookPermissionsKey : @[@"public_profile"]
};
[accountStore requestAccessToAccountsWithType:accountType
options:options
completion:^(BOOL granted, NSError *error)
{
if(granted)
{
}
else
{
NSLog(@"%@", [error description]);
}
}];
}
When I am trying to login with facebook in iOS 9.2.1 the "granted" parameter always become false. I have tried in other versions like iOS 9.2 and iOS 9.1 it working fine
I have made lots of R&D in stack and also in google but not able to find proper solution.
Your help would be appreciable.
Thanks.