Marcel Marcel - 23 days ago 9
Swift Question

Facebook iOS Swift SDK: Not getting callback

I'm using the facebook getting started guide to create a simple facebook login. (

Whenever I tap the button it opens the facebook login view, lets me log in but afterwards doesn't fire a callback. The view just stays open and white.

let loginButton = LoginButton(readPermissions: [ .publicProfile ]) =


enter image description here

All I'm getting in the console is the following, if that's of any help:

2016-09-27 01:14:41.294 app[48118:6370539] -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"


Turns out I was missing the AppDelegate part to handle url opens:

func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
  return SDKApplicationDelegate.shared.application(application,
                                                   open: url,
                                                   sourceApplication: sourceApplication,
                                                   annotation: annotation)