com.facebook.sdk.core error 8
Asked Answered
V

15

26

This is more informative than anything. I couldn't for the life of me find anything on error code 8 when trying to access the login prompt (aka safari) when debugging my ios app. After I hit the log into facebook button in my app it would attempt to open safari then dump me back to the login page to my app. The error was being caused by the permissions array. I had the the permission "public_profile" spelled "public profile" which was throwing an error obviously. So make sure your permission are type corrected if you get the com.facebook.sdk.core error 8.

Hope that helps someone.

Vermination answered 28/7, 2015 at 18:43 Comment(0)
V
9

Make sure your permissions are typed correctly

   func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!) {

            if error == nil {
                println("login complete")
                self.performSegueWithIdentifier("showLogin", sender: self)

            }else{

                println(error.localizedDescription)
    //com.facebook.sdk.core error 8.
            }
        }
Vermination answered 28/7, 2015 at 18:43 Comment(0)
S
4

In my case this error was caused by improper bundle id set in facebook settings of the app itself. Facebook "bundle id" is case sensitive, in my Info.plist I had uppercase product name, but in fb settings - lowercase.

Script answered 17/9, 2015 at 17:21 Comment(2)
For me, it turned out our bundle id in production version was different and wasn't in the facebook app settings for ios.Popularize
It solved my error thank you so much for contributing. @GameConCrudity
P
4

In my case, I was using a Facebook account that hadn't yet been added to any of the Facebook app's admins/developers/testers roles.

Profluent answered 17/9, 2015 at 20:34 Comment(2)
Facebook itself will display an error message when you log in, to the effect that you aren't a tester for this test app.Anstice
THANK YOU! This saved my life.Branks
F
3

In my case, after spending several hours of debugging I found that I was using the API,

func application(application: UIApplication,
                 openURL url: NSURL, options: [String: AnyObject]) -> Bool {
    if #available(iOS 9.0, *) {
        FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: options)
    } else {
        // Fallback on earlier versions
    }
    return true
}

which is deprecated for iOS 9.So, I used:

func application(application: UIApplication,
                 openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
    FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
    return true
}

Which worked for me. Hope this saves time of someone.

Forworn answered 27/7, 2016 at 7:20 Comment(0)
A
3

MAN!!! In my case it was the "bio" in the parameter that was causing this error. Facebook has changed the "bio" key to "about". So anyone using "bio" in parameters should change it to "about"

Pheww!!!

Actinomycete answered 27/10, 2016 at 11:45 Comment(2)
Bio was deprecated in version 2.8 and above I believe. I had this issue. Thanks for posting this.Crownpiece
glad I could help! Good luck!Actinomycete
E
2

In my case It was wrong version. Instead of version: "v2.7", I used version: "2.7"

Evenhanded answered 30/9, 2016 at 12:8 Comment(0)
P
1

In my case it was because I listed name twice in the fields array. Assume that would apply to any field requested twice.

Peruse answered 14/4, 2017 at 9:40 Comment(0)
U
0

I had the same problem. It was because I didn't implement facebook login feature. After adding that, I logged in and my problem got solved.

Uniformed answered 3/8, 2016 at 6:49 Comment(0)
A
0

In my case, I was playing with the Facebook Ads API and I tried to get a field but the name was wrong.

I had insights{date_start,date_end}, instead of insights{date_start, date_stop}.

More info here.

Hope it helps anyone.

Agonist answered 4/4, 2017 at 8:37 Comment(0)
G
0

In my case, I tried to get Facebook Id without logging into Facebook. Make sure you're logged into Facebook.

let accessToken = FBSDKAccessToken.current()
    if accessToken != nil {

        self.getCurrentUserFbId()
        print("LoggedIn")

    } else {

        print("Not loggedIn")
        self.loginIntoFacebook()
    }

Hope this will helpful for anyone.

Getraer answered 1/8, 2017 at 13:5 Comment(0)
E
0

When it happened to me, I found that Facebook's access token was expired. Someone decided to store access token in UserDefaults and reuse it later. Of course all tokens more than ~2 months old were expired.

Egg answered 26/7, 2018 at 19:23 Comment(0)
E
0

In my case it was because of GraphRequest.

The error response is

"com.facebook.sdk:FBSDKErrorDeveloperMessageKey" = "Syntax error \"Expected end of string instead of \"%\".\" at character 5: email%2Cname%2Cgender%2Cpicture"; "com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey" = 0; "com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode" = 2500; "com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey" = 400; "com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey" = { body = { error = { code = 2500; "fbtrace_id" = AFEUYbcYP39; message = "Syntax error \"Expected end of string instead of \"%\".\" at character 5: email%2Cname%2Cgender%2Cpicture"; type = OAuthException; }; }; code = 400; };

The issue about that is https://github.com/facebook/facebook-swift-sdk/issues/309

Electrophorus answered 26/12, 2018 at 14:9 Comment(0)
J
0

In my case was because of birthday,friendlists . removing them started to work.

Jefferey answered 19/7, 2019 at 8:48 Comment(0)
C
0

For me just had to go facebook developer under platform and activate deep linking

Cutlor answered 30/8, 2020 at 8:31 Comment(0)
B
-1

In our case we were seeing this issue while trying to log in with some test account (but not all). We were not following Facebook's recommended practice:

Before you test each use case below, make sure you remove your app from your test user's Facebook account using app settings.

After we did it for the failing test accounts, we were able to log in.

Beaker answered 23/11, 2021 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.