I found a solution, the problem is that you did not complete the Facebook login process.
When you make a login request to Facebook, and then the user uses the login through the Facebook application, the Facebook application opens your application again and calls
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool
in the application delegate, to complete the process, you need to pass the Facebook SDK the URL obtained from Facebook as follows:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(app, open: url, options: options) == true { }
Then you will see that the entry request will return an access token and will not be canceled.
source share