I'm trying to make my user login using Facebook. If they are not logged in, my app brings up an overlay view that forces the user to login. This is how I do that:
self.overlay.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)
loginButton.readPermissions = ["public_profile", "email", "user_friends"]
self.loginButton.delegate = self
self.loginButton.center = self.overlay.center
self.overlay.addSubview(self.loginButton)
UIApplication.shared.keyWindow?.addSubview(overlay)
The login button shows up and covers the whole screen, which is exactly what I want, but then once the user clicks on the login button, it doesn't bring up the login page as expected. I believe this is because the overlay is covering it. The console prints this error:
"canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2017-12-03 17:05:02.683700-0800 FinalProject[3093:58095]" I'm completely stumped here. Not sure if it's relevant, but this is within a TableViewController.
Thanks!