I\'m using the latest Facebook SDK on iOS 5. I can use SSO to successfully authenticate the user, and then I attempt to share a link like this:
NSString *app
I was also occasionally getting this -999 NSURLDomainError when trying to bring up the facebook post window. I took the strategy of ignoring the error code as Senior mentions in the comments.
The reason I don't feel so bad about this fix is that the FBLoginDialog actually already ignores this error. Check out the code in github:
https://github.com/facebook/facebook-ios-sdk/blob/master/src/FBLoginDialog.m#L85
So to be specific, here's what my webView:didFailLoadWithError method looks like in FBDialog.m now:
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
// 102 == WebKitErrorFrameLoadInterruptedByPolicyChange
NSLog(@"FBDialog webView didFailLoadWithError:%@ %d",error.domain,error.code);
if ([error.domain isEqualToString:@"NSURLErrorDomain"] && error.code == -999)
return;
if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102)
return;
[self dismissWithError:error animated:YES];
}