Skip to content

Instantly share code, notes, and snippets.

@ethanmick
Created February 7, 2014 23:22
Show Gist options
  • Select an option

  • Save ethanmick/8873989 to your computer and use it in GitHub Desktop.

Select an option

Save ethanmick/8873989 to your computer and use it in GitHub Desktop.
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
/**
* Interesting enough, this method is called sometimes when authenticating with Facebook - but the page continuous to load, and
* does so sucessfully. The user can actually login. Other time though, the request may fail and be an actual failure.
*
* Because we don't really know the nature of this error, nor can we assume, we need to call the delegate and inform them of the error.
*/
NSLog(@"WebView error. This sometimes happens when the User is logging into a social network where cookies have been stored and is already logged in. %@", [error description]);
if ([self.delegate respondsToSelector:@selector(cmSocialLoginViewController:hadError:)]) {
[self.delegate cmSocialLoginViewController:self hadError:error];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment