Reputation: 2394
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.
Upvotes: 26
Views: 22488
Reputation: 7814
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.
Upvotes: -1
Reputation: 7
For me just had to go facebook developer under platform and activate deep linking
Upvotes: 0
Reputation: 351
In my case was because of birthday,friendlists . removing them started to work.
Upvotes: 0
Reputation: 13744
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
Upvotes: 0
Reputation: 4437
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.
Upvotes: 0
Reputation: 9764
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.
Upvotes: 0
Reputation: 1647
In my case it was because I listed name
twice in the fields array. Assume that would apply to any field requested twice.
Upvotes: 1
Reputation: 21470
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.
Upvotes: 0
Reputation: 1173
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!!!
Upvotes: 3
Reputation: 2216
In my case It was wrong version. Instead of version: "v2.7", I used version: "2.7"
Upvotes: 2
Reputation: 2061
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.
Upvotes: 0
Reputation: 513
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.
Upvotes: 3
Reputation: 41
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.
Upvotes: 4
Reputation: 2629
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.
Upvotes: 4
Reputation: 2394
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.
}
}
Upvotes: 9