我正在嘗試設置適用於iOS的Facebook SDK 3.5。我已經得到它的工作,但它現在正在崩潰。當用戶通過默認的iOS facebook設置(AKA而不是來自應用商店的Facebook應用)登錄時,崩潰似乎只發生。當點擊Facebook「登錄」視圖時,該應用程序崩潰。Facebook iOS崩潰
崩潰是:錯誤:[NSError fberrorShouldNotifyUser]:無法識別的選擇器發送到實例。
我已經做了一些Research和一些人建議將-Objc放到「其他鏈接器標誌」。我沒有那麼確切,但我有類似的想法。我需要其他庫的其他選項。這裏是我的選擇:
誰能告訴我,如果這導致了問題?如果沒有,有人知道究竟是什麼造成了這次事故?謝謝!
編輯
這似乎錯誤是在一開始,這種情況發生的方法「如果」
- (void)loginView:(FBLoginView *)loginView
handleError:(NSError *)error {
NSString *alertMessage, *alertTitle;
if (error.fberrorShouldNotifyUser) // CRASH HERE {
// If the SDK has a message for the user, surface it. This conveniently
// handles cases like password change or iOS6 app slider state.
alertTitle = @"Facebook Error";
alertMessage = error.fberrorUserMessage;
} else if (error.fberrorCategory == FBErrorCategoryAuthenticationReopenSession) {
// It is important to handle session closures since they can happen
// outside of the app. You can inspect the error for more context
// but this sample generically notifies the user.
alertTitle = @"Session Error";
alertMessage = @"Your current session is no longer valid. Please log in again.";
} else {
// For simplicity, this sample treats other errors blindly.
alertTitle = @"Unknown Error";
alertMessage = @"Error. Please try again later.";
NSLog(@"Unexpected error:%@", error);
}
}
看到這個問題:http://stackoverflow.com/q/15640510/1402846 – Pang