facebook-ios-sdk
facebook-ios-sdk copied to clipboard
GraphRequest.start { connection, result, error } doesn't complete after the app is deauthorized from account
Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing GitHub issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.2
Facebook iOS SDK version
16.3.1
Dependency Manager
CocoaPods
SDK Framework
Login
Goals
I'm trying to get the error from GraphRequest.start { connection, result, error } when the app is deauthorized from a FB account. I tried to do the same on the Android SDK and it worked, this one didn't.
Note: I used the test app instead of the live one
Expected results
The method should complete with error
Actual results
The method doesn't complete until after a few more calls
Steps to reproduce
- Login using SDK with any FB account
- Call the
GraphRequest.start - Go to the FB account's settings -> Apps and websites -> Remove the app
- Call the
GraphRequest.startagain
Code samples & details
// login
loginManager.logIn(permissions: permissions, from: viewController, handler: { result, error in
if error != nil {
print("error")
} else if result!.isCancelled{
print("canceled")
} else {
print("success")
}
})
// graph request
GraphRequest(graphPath: "me", parameters: ["fields": fields]).start { connection, result, error in
if let result = result as? NSDictionary, error == nil {
print("success")
} else {
print("error")
}
}