4

I share image image to Flickr using theirs standart API.

There are no problems with internet, sometimes it uploads the image, sometimes I receive such error.( When i press autorize button)

Can some help to solve or explain this problem? Is it connected with API, my sharing code, internet, or something else? Thank you.

Error Domain=com.flickr Code=108 "The operation couldn’t be completed. Invalid frob" UserInfo=0x1fdf10e0 {NSLocalizedFailureReason=Invalid frob}

OFFlickrAPIRequest *request = ....;
...
NSData *imageData = UIImageJPEGRepresentation(image, 0.8);
NSInputStream *imageStream = [NSInputStream inputStreamWithData:imageData];

[request uploadImageStream:imageStream suggestedFilename:@"Image.jpg" MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys: @"text", @"title", nil]];
B.S.
  • 21,660
  • 14
  • 87
  • 109
  • put relavent code here :0 – iPatel Mar 12 '13 at 14:46
  • It is sharing, to much code too is there, i added uploading code, but i think the problem is not here. – B.S. Mar 12 '13 at 14:51
  • Seems to be a token issue from I could see searking in Google "invalid frob flickr". – Larme Mar 12 '13 at 15:11
  • Does actually the request go through and get a response? Look at this: [didFailLoadWithError is called with UIWebView even though page later loads](http://stackoverflow.com/questions/7028383/didfailloadwitherror-is-called-with-uiwebview-even-though-page-later-loads) – Ahmed Al Hafoudh Mar 14 '13 at 15:03

2 Answers2

0

Try this:

  1. Setup burpsuite proxy
  2. Point your simulator/mac/iphone to the proxy
  3. Turn off SSL on flickr API client. If you cannot turn of SSL for Flickr API, create self signed certificate, import it to iPhone, import it to burpsuite and enable https proxying.
  4. Make few requests until you get the error.
  5. Inspect error in burpsuite.

Most of this is described in this tutorial: Intercept iPhone and iPad SSL connections that require a valid SSL certificate

Ahmed Al Hafoudh
  • 8,281
  • 1
  • 18
  • 34
  • Is there any tutorial how to make that? – B.S. Mar 14 '13 at 15:32
  • Try this: http://community.securusglobal.com/2012/09/11/how-to-intercept-iphone-and-ipad-ssl-connections-that-require-a-valid-ssl-certificate/ – Ahmed Al Hafoudh Mar 14 '13 at 17:09
  • Didn't help or i do not understand how to use it – B.S. Mar 18 '13 at 15:57
  • [Charles](http://www.charlesproxy.com) is easy to set up with the simulator, and they have a certificate ([and instructions](http://www.charlesproxy.com/documentation/using-charles/ssl-certificates/)) you can install that will allow it to inspect SSL traffic. It costs money but there is a trial. – Brendon Mar 20 '13 at 20:01
0

I spent a lot of time debugging this error:

Flickr says: Invalid frob

But i am sure that everything is ok with frob string.

I know that it is bad solution, even not a solution, but i made it work: So what i did is after i receive such a rare error I make again token request using the save frob everything works nice. (if frob is really invalid that how can it upload it from the next try).

B.S.
  • 21,660
  • 14
  • 87
  • 109