14

I want to integrate with Facebook login SDK in my iOS project. The problem is I got this error message during launching the app.

2015-01-08 18:33:06.591 XXXXX[24994:2533100] *** Terminating app due to uncaught exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: No AppID provided; either pass an AppID to init, or add a string valued key with the appropriate id named FacebookAppID to the bundle *.plist'

I already include this line into my info.plist but it is still not working.

info.list

<key>FacebookAppID</key>
    <string>&lt;1025024xxxxxxxx&gt;</string>
    <key>FacebookDisplayName</key>
    <string>XXXXXX</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb&lt;1025024xxxxxxxx&gt;</string>
            </array>
        </dict>
    </array>

I suspect it has not detected my Facebook ID. I'm using Xcode6.1.

2 Answers 2

35

There is two info.plist file in your project with same name. one folder for YourProjectTests in which info.plist file and other YourProject is also info.plist file.

Two plist file :

enter image description here

You have to set your FacebookAppID in YourProject info.plist file, but not set YourProjectTests info.plist

This error is occurs because of YourProjectTests in which info.plist file setting FacebookAppID

Add Your FacebookAppID inabove info.plist file as above image.

Otherwise set also FacebookAppID as below.

enter image description here

1
  • 1
    Yes! In my case, somehow my XCTests Info.plist was where I thought my main project's should have been. Jun 10, 2016 at 2:58
1

if you have already added App ID in info.plist and getting crash then make sure you have added this single line code in AppDelegate Class didFinishLaunchingOption

//Facebook setup
    ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.