I\'m trying to implement Facebook login in my iOS app, using Parse.
let permissionsArray = [\"public_profile\", \"email\"]
PFFacebookUtils.logInInBackgroun
Before downgrading, I would try to clear out the local cache. I've had this problem when switching between Facebook accounts. Delete your app, force the Facebook to quit and then re-run everything and see if it persists. There may be a bug where Facebook is passing an old cached key that is no longer valid. Downgrading could be clearing the cache or the older version doesn't have the bug.
Im using PFFacebookUtils 1.9.0 and FBSDKLoginKit 4.7.0
happend to me after logout and login(without restarting app)
solution - objective c:
just add [[PFFacebookUtils facebookLoginManager] logOut];
before [PFFacebookUtils logInInBackgroundWithReadPermissions
Use the same FBSDKLoginManager instance until logout, THEN create a new instance.
[fbLoginManager logOut];
fbLoginManager = [[FBSDKLoginManager alloc] init];
I'm using
pod 'FBSDKCoreKit', '~> 4.8.0'
pod 'FBSDKLoginKit', '~> 4.8.0'
pod 'FBSDKShareKit', '~> 4.8.0'
... and had the code 308 problem when I logged out and logged in during the same session. Using [[FBSDKLoginManager alloc] logOut] or [facebookLoginManager logOut] (with a persisted manager) just before calling logInWithReadPermissions: didn't work, but adding
[FBSDKAccessToken setCurrentAccessToken:nil];
[FBSDKProfile setCurrentProfile:nil];
before the logInWithReadPermissions: call works ok. (Tested in iOS 9.2.)
Apparently the only solution that worked for me is to add the Keychain Sharing Entitlement for the target.
You can find it in Project_name->target_name->Capabilities->Keychain Sharing
I only saw this error when I logged out, then logged back in.
My login and logout code were located in different files, as the relevant UI for login and logout are entirely different, and I had instantiated two separate FBSDKLoginManager instances. Consolidating to only one instance solved the problem for me.