上传照片时出错:tumblr api ios

时间:2015-04-09 12:10:14

标签: ios tumblr

当我尝试使用以下代码上传图片时,

NSString *imagePath = [photo getAbsouluteMediaPath]; // imagePath = assets-library://asset/asset.JPG?id=F6DDD72D-5E08-4C9C-9D5C-E7382578B3FC&ext=JPG

        [[TMAPIClient sharedInstance] photo:name filePathArray:@[imagePath] contentTypeArray:@[@"image/jpg"] fileNameArray:@[@"Photo.jpg"] parameters:@{@"caption" : @"test"} callback:^(id response, NSError *error) {

            if (error){
                NSLog(@"Error posting to Tumblr %@",error);
            }
            else{
                NSLog(@"Posted to Tumblr");
            }
        }];

我得到以下错误,

Error Domain=Request failed Code=400 "The operation couldn’t be completed. (Request failed error 400.)"

请帮我找到问题!

0 个答案:

没有答案