Reputation: 1988
Facebook comment part of webview keep loading and it never finish on device. But, it works just fine on simulator. Does somebody have an idea to fix this? Thanks in advance!
This is the code to add UIWebview on UIViewController.
NSString *address = @"http://techcrunch.com/2012/03/10/entrepreneurs-are-difficult-at-best-and-abrasive-at-worst-get-over-it/?grcc=33333Z98";
//make webview frame
webView_ = [[UIWebView alloc] init];
webView_.delegate = self;
webView_.frame = self.view.bounds;
webView_.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
webView_.scalesPageToFit = YES;
[self.view addSubview:webView_];
//load page on webview
NSURL *myURL = [NSURL URLWithString:address];
NSURLRequest *myURLReq = [NSURLRequest requestWithURL:myURL];
[webView_ loadRequest:myURLReq];
This is the error message on - (void)webView:(UIWebView *)webView didFailLoadWithError:
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn't be completed. (NSURLErrorDomain error -999.)"
Update
I tested it with a clean uiwebview, since the previous build had Sharekit plugin, but the error still exist with a new build. Also, this link is related, First dialog after authenticating fails immediately and closes dialog
Upvotes: 2
Views: 726
Reputation: 8154
FYI, I opened a bug recently on this. Facebook hasn't really responded and oddly classified it as a "wishlist" item: https://developers.facebook.com/bugs/373249496041875?browse=search_4fa8cf425c5aa8d66140047
Upvotes: 1