App crashes when tapping on FBSDKLoginButton:
@property (weak, nonatomic) IBOutlet FBSDKLoginButton *fbLoginButton;
- (void)viewDidLoad {
[super viewDidLoad];
[_fbLoginButton setReadPermissions:@[@"public_profile", @"email", @"user_friends"]];
[_fbLoginButton setDelegate:self];
}
Nothing more than this but when tap on the button app crashes with below messages.
*** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '+[FBSDKInternalUtility areAllPermissionsReadPermissions:]:
unrecognized selector sent to class 0x100296a00'
I ran into this error when I was using two different Facebook frameworks (specifically FBSDKCoreKit.framework
and FBSDKLoginKit.framework
) that were from different release packages.
Make sure that all of your Facebook frameworks are from the same release package. You can see a list of stable releases here.
This issue can also come up when using a service like Gigya that intergrates with Facebook's SDK. If you're using Gigya, make sure you're using the version of the Facebook SDK that they recommend rather than the latest version.