iOS - Facebook Login Error - Unknown Error building URL (com.facebook.sdk.core error 3) iOS - Facebook Login Error - Unknown Error building URL (com.facebook.sdk.core error 3) ios ios

iOS - Facebook Login Error - Unknown Error building URL (com.facebook.sdk.core error 3)


If you upgraded the Facebook iOS SDK to version 4.39.0, there is a bug that causes this error. Downgrade to 4.38.1 will help you solve this problem. Be sure to downgrade both FBSDKCoreKit and FBSDKLoginKit.

pod 'FBSDKCoreKit', '~> 4.38.0'pod 'FBSDKLoginKit', '~> 4.38.0'

Be sure to clean the build folder and re-build the SDK.

update: This bug has been fixed in 4.39.1 SDK release. https://developers.facebook.com/docs/ios/change-log-4x/


This is a Facebook SDK bug in version 4.39.0 which is causing this error. In order to solve this bug, simply downgrade both CoreKit and LoginKit to 4.38.0, clear derived data as well as clean build folder (CMD + OPTION + SHIFT + K). Whereas 4.38.1 also works fine.

pod 'FBSDKCoreKit', '~> 4.38.0'pod 'FBSDKLoginKit', '~> 4.38.0'

If you are using FacebookCore and FacebookLogin then do like the following.

pod 'FacebookCore'pod 'FacebookLogin'pod 'FBSDKCoreKit', '~> 4.38.0'pod 'FBSDKLoginKit', '~> 4.38.0'


For me, the problem was that the Facebook App ID indicated in CFBundleURLTypes >CFBundleURLSchemes in Info.plist were spelled out incorrectly.

I was importing the app ID from an .xcconfig file so that its underlying value changes depending on whether I'm running a Debug or Release scheme. However, when I printed out the plist file, there were unnecessary quotation marks around the app ID when read from the xcconfig files. For example, where the URL scheme should be fb012345678, it was fb"012345678".

I tried hardcoding the app IDs correctly into the Info.plist as stated in the Facebook guide, and the FBSDKLoginButton just worked. Safari came up to display the Facebook login screen. You don't have to hardcode the IDs though--just make sure they are substituted correctly in Info.plist.