This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIImage* image = [UIImage imageNamed:@"inspiration-2.jpg"]; // image stored in app's resources | |
// stage an image | |
[FBRequestConnection startForUploadStagingResourceWithImage:image | |
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { | |
if(error) { | |
NSLog(@"Error staging resource.\n%@", error); | |
int code = [[[[[error userInfo] objectForKey:@"com.facebook.sdk:ParsedJSONResponseKey"] objectForKey:@"body"] objectForKey:@"error"] objectForKey:@"code"]; | |
if(code == 2500) { |
OlderNewer