I need to know when a user did not give Facebook access to my application during openActiveSessionWithReadPermissions. (It is not indicated that the switch is set to "OFF" in the "Settings"> "Facebook-> My Application" section.)
Here is the error, if not provided:
Domain error = com.facebook.sdk Code = 2 "The operation could not be completed (com.facebook.sdk 2 error.)" UserInfo = 0x1fd46780 {com.facebook.sdk: ErrorLoginFailedReason = com.facebook.sdk: ErrorLoginFailedReason}
For comparison: there is no error for the network:
Domain error = com.facebook.sdk Code = 2 "Operation could not be performed. (Com.facebook.sdk error 2.)" UserInfo = 0x1edf2eb0 {com.facebook.sdk: ErrorLoginFailedReason = com.facebook.sdk: ErrorLoginFailedReason, com .facebook.sdk: ErrorInnerErrorKey = Domain Error = NSURLErrorDomain Code = -1009 "Internet connection disconnected." UserInfo = 0x1ed47a20 {NSErrorFailingURLKey = https://api.facebook.com/method/auth.iosauthorizeapp, NSErrorFailingURLStringKey = https://api.facebook.com/method/auth.iosauthorizeapp, NSLocalizedDescription = Internet connection disconnected. }}
Is there a safe way to detect when a user is not provided? Am I just looking for error code 2 and one key / value pair in the UserInfo dictionary?
I would like Facebook to give us BOOL granted , as in ACAccountStoreRequestAccessCompletionHandler .
source share