facebook / facebook/facebook-ios-sdk
GraphRequest.start { connection, result, error } doesn't complete after the app is deauthorized from account
- Dominant language
- Swift
- Stars
- 8.1k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 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](https://github.com/facebook/facebook-ios-sdk/issues)
- [X] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [X] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [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
1. Login using SDK with any FB account
2. Call the `GraphRequest.start`
3. Go to the FB account's settings -> Apps and websites -> Remove the app
4. Call the `GraphRequest.start` again
### Code samples & details
```swift
// 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")
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.