我正尝试使用Facebook OAuth授权URL加载UIWebView
,并且正在使用以下代码。当我的UIWebView
加载Facebook登录页面时,我输入我的凭据,然后按“登录”按钮。当我按下按钮,我收到以下错误:iOS 5中的新错误:WebKit丢弃未捕获的异常
WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener:delegate: Application tried to present modally an active controller .
此相同的代码工作正常的iOS 4.3和以前的版本,但它并没有在安装iOS 5.0的工作。我不明白这个问题,谁能帮我吗?
NSString *redirectUrlString = @"http://www.facebook.com/connect/login_success.html";
NSString *authFormatString = @"https://graph.facebook.com/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@&type=user_agent&display=touch";
NSString *urlString = [NSString stringWithFormat:authFormatString, _apiKey, redirectUrlString, _requestedPermissions];
NSURL *url = [NSURL URLWithString:urlString];
NSLog(@"NSURL: %@", urlString);
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_webView loadRequest:request];
非常感谢Karl Goodhew! –
感谢它也帮助我...... :)干杯... :) :) –
现在我得到这个错误怎么办请帮助安全警告:“请把上面的URL作为你的密码对待,不要分享它与任何人。我在网上搜索了这么多,但没有任何工作有些人说,从http更改网址到https和一些说在Facebook帐户禁用安全浏览,但这些所有的东西都无法正常工作。 –