I am working on a project for iPhone where I have to take images from Instagram. I implemented the following API as mentioned on its developer site:
When I hit this URL in my UIWebview I get the following error:
Error Domain=WebKitErrorDomain Code=102 "Frame load interrupted"
But when I hit the same URL in the device browser it works. But it modifies the URL to be:
I also tried to put this modified URL in my code. Then it works and asks me to log in. But when I log in I get this error.
{ "code": 400, "error_type": "OAuthException", "error_message": "You must include a valid client_id, response_type, and redirect_uri parameters" } I recently created a client ID and checked all parameters. So I'm not sure what the issue is. I googled it and found that UIWebView doesnt allow this. So I put this in didFinishLaunching in my AppDelegate class:
NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3", @"UserAgent", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:dictionary]; But this is also not working. Please advise for any solution regarding this.
0 comments:
Post a Comment