Swift Facebook Login AppID Not Registered as a URL Scheme

11.1k views Asked by At

I'm getting the following error when trying to login with Facebook

Terminating app due to uncaught exception 'InvalidOperationException', reason: 'fb---AppID--- is not registered as a URL scheme. Please add it in your Info.plist'

The problem is the "fb---AppID---" is in my Info.plist file. I followed the 3 bullet points listed in the FB Documentation shown here.

I copied the app name and app id directly from the documentation. What am I doing wrong? Is there a step missing in the documentation? Did I not configure it correctly somewhere else?

enter image description here

6

There are 6 answers

0
josealvarado111 On BEST ANSWER

I figured out the solution. Do not copy and paste the App Name given to you on step 2 of the section titled "Configure your info.plist" on the facebook documentation.

I assumed it was the name of my ios project, but it's actually the App Name in your bundle identifier. The only difference between the two was that the first character of the app name in my bundle identifier was not capitalized.

0
Noe On

Even after all changes suggestion the error message happened, than after a long time working on one suffixed was created at developer.facebook.com on iOS place and on info.plist the same code was inserted on FacebookUrlSuffix string, finally the message erros disappeared

0
backspace83 On

I solved the problem inserting

ApplicationDelegate.shared.application(application,didFinishLaunchingWithOptions: launchOptions)

in AppDelegate's didFinishLaunchingWithOptions

0
Darko On

I solved the problem by consulting the facebook documentation where I saw that had the fb prefix before the ID of the app, and FacebookAppID didn't.

0
ANISH S NAIR On

Remove "fb" prefix from the FacebookAppID (Only from FacebookAppID)

0
Symyon On

Another issue with that may be if you already integrated another login service like Google for ex, and you already have the "URL types" and "URL Schemas" in your info.plist

Make sure you looked the entire info.plist and not duplicating those nodes, just ad your Facebook data to the existing ones.