我剛剛更新了我的Parse和Facebook SDK(分別爲1.7.1和4.0) - 這兩個都是絕對痛苦的工作,我可能會添加!解析無效的會話令牌(代碼:209,版本:1.7.1)
但是我現在越來越209個錯誤,當我試圖在這裏的Facebook登錄是我的代碼
- (void)loginWithFacebook:(HMSuccessBlock)completion{
NSArray *permissionsArray = @[@"user_about_me",@"user_location",@"user_friends",@"user_relationships"];
// Login PFUser using Facebook
[PFFacebookUtils logInInBackgroundWithReadPermissions:permissionsArray block:^(PFUser *user, NSError *error) {
if (!user) {
NSLog(@"Uh oh. The user cancelled the Facebook login.");
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Log In Error"
message:error.localizedDescription
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:@"Dismiss", nil];
[alert show];
completion(NO, error);
} else if (user.isNew) {
NSLog(@"User signed up and logged in through Facebook!");
if (completion) {
completion(YES, nil);
}
} else {
NSLog(@"User logged in through Facebook!");
completion(YES, nil);
}
}];
}
哪個yeilds以下[錯誤]一個例子:無效的會話令牌(代碼: 209,版本:1.7.1)
我最初的想法是,這個問題必須要做些什麼與我的應用程序委託代碼 - 舊版本的我會申請將下面的代碼
的facebooksdk的- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [FBAppCall handleOpenURL:url
sourceApplication:sourceApplication
withSession:[PFFacebookUtils session]];
}
但是我似乎無法找到任何在更新的版本複製這一點,因此我的代碼是
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
任何幫助,將不勝感激
這是現在Facebook的解析工程隊一個公認的bug https://developers.facebook.com/bugs/756392341145634/ – CPD 2015-04-29 15:42:41