Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone facebook graph api教程获取错误_Iphone_Objective C - Fatal编程技术网

Iphone facebook graph api教程获取错误

Iphone facebook graph api教程获取错误,iphone,objective-c,Iphone,Objective C,我正在使用这些教程在iphone中实现facebook graph api 但当我点击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: &

我正在使用这些教程在iphone中实现facebook graph api 但当我点击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>.
但是我没有成功,任何人都有关于这篇文章的答案,请与我分享

离开该教程:

https://developers.facebook.com/ios/
使用这一款,对您来说很简单,并且分步骤进行:

从这里下载Facebook新SDK,您不需要像ray教程前面那样单独调用:

https://developers.facebook.com/ios/
最简单的教程供初学者使用和访问facebook SDK中的Graph API/FQL等:

https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/

希望能有所帮助。

嘿,我在代码中遇到了同样的问题,使用 但经过数小时的研究和一些代码调试后,问题解决了

我为了方便而更改的代码

  • (BOOL)webView:(UIWebView*)webView应加载WithRequest:(NSURLRequest*)请求导航类型:(UIWebViewNavigationType)导航类型{

    NSString*urlString=request.URL.absoluteString

    [self-checkForAccessToken:urlString]

    if(self.isViewLoaded&&self.view.window){

    }

    [self-CheckLogin Required:urlString]

    返回TRUE

}

-(void)checkLoginRequired:(NSString*)urlString{

    NSLog(@"Url: %@",urlString);

    if ([urlString rangeOfString:@"login.php"].location != NSNotFound && [urlString rangeOfString:@"refid"].location == NSNotFound) {
        NSLog(@"Login Required");
        [_delegate displayRequired];

    } else if ([urlString rangeOfString:@"login_success"].location != NSNotFound) {
        NSLog(@"login_success");

       //any thing you want to do after log in success.
    }
    NSLog(@"Url: %@",urlString);

    if ([urlString rangeOfString:@"login.php"].location != NSNotFound && [urlString rangeOfString:@"refid"].location == NSNotFound) {
        NSLog(@"Login Required");
        [_delegate displayRequired];

    } else if ([urlString rangeOfString:@"login_success"].location != NSNotFound) {
        NSLog(@"login_success");

       //any thing you want to do after log in success.
    }