I'm uploading photos to Facebook from my iPhone application. I've got it working, except that sometimes, it returns "Unknown Error Occurred". I'm not sure what the problem is. This happens about 75% of the time.
Has anyone else encountered this?
I'm uploading photos to Facebook from my iPhone application. I've got it working, except that sometimes, it returns "Unknown Error Occurred". I'm not sure what the problem is. This happens about 75% of the time.
Has anyone else encountered this?
Still not sure what was happening, but I solved the problem. Here's what I did:
- (void)request:(FBRequest*)request didFailWithError:(NSError*)error {
if ([error code] == 1 && [[request method] isEqualToString:@"photos.upload"]) {
FBRequest *tryAgain = [FBRequest requestWithDelegate:self];
[tryAgain call:[request method] params:[request params] dataParam:(NSData *)[request dataParam]];
}
}
Essentially, I just made it try again. Resending the same request didn't work (failed with an invalid signature), so I created a new request with the properties of the old one.
The nice thing about this is that it is sort of recursive: if the new request fails too, it will just keep trying. I hope I don't encounter any negative side-effects of that, though.