我正在使用这些教程在 iphone 中实现 facebook graph api http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app 但是当我点击 facebook 登录像这样在 nslog 文件上出现错误
2013-01-09 18:50:54.509 FBFun[3279:11303] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> Application tried to present modally an active controller <ViewController: 0x75446a0>.
我尝试通过此链接上发布的答案来解决问题
iOS 5 中的新错误:WebKit 丢弃了未捕获的异常
这是链接上的答案
-(void)checkLoginRequired:(NSString *)urlString {
NSLog(@"Url: %@",urlString);
if ([urlString rangeOfString:@"login.php"].location != NSNotFound && [urlString rangeOfString:@"refid"].location == NSNotFound) {
[_delegate displayRequired];
} else if ([urlString rangeOfString:@"user_denied"].location != NSNotFound) {
[_delegate closeTapped];
}
}
但我没有成功,有人对这篇文章有答案,请与我分享