iOS - Facebook Login Error - Unknown Error building URL (com.facebook.sdk.core error 3)
<p>I am using Facebook login for my iOS app being developed for iOS 8 and onwards. (Latest Facebook SDK is being used)</p>

<p>I have followed all the essential steps described by the Facebook official guide. However, when I click the login button it gives me the following error:</p>

<blockquote>
  <p>Unknown Error building URL (com.facebook.sdk.core error 3)</p>
</blockquote>

<p>I have checked, to look what I might have done wrong, but everything seems as per guide, and I have been stuck here for a day.</p>

<p>Code for FB Login Delegate:</p>

<pre><code>class FBLoginDelegate: NSObject,  FBSDKLoginButtonDelegate  {


func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!){
    if(error == nil){
        print("Logged In from Btn")
    }else{
        print("Error: \(error.localizedDescription)") //Here it gives the error 
    }

}
}
</code></pre>

<p>Code for FB login button: </p>

<pre><code>      var fbLoginBtnDelegate = FBLoginDelegate()
    let fbBtnWidth = self.view.bounds.width - (self.fbContainerLeftConstraint.constant + self.fbContainerRightConstraint.constant)
    let fbLoginButton = FBSDKLoginButton(frame: CGRectMake(0,0,fbBtnWidth,self.fbButtonContainer.bounds.size.height))

    self.fbButtonContainer.addSubview(fbLoginButton)
    fbLoginButton.readPermissions = ["public_profile", "user_friends", "email", "user_birthday"]
    fbLoginButton.delegate = fbLoginBtnDelegate
</code></pre>