我正在尝试使用ASIHttpRequest将照片上传到Flickr。 我可以让用户授权应用程序并获取访问令牌。然后,当我尝试上传照片时,它失败并出现以下错误
“NO Error Domain = ASIHTTPRequestErrorDomain Code = 3”身份验证 需要“UserInfo = 0x9757d0 {NSLocalizedDescription =身份验证 需要}“
图片是我要上传的照片,
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:[NSUrl urlWithString:@"http://api.flickr.com/services/upload/"] autorelease];
NSData *data = UIImagePNGRepresentation(aJob.image);
[request setPostValue:FLICKR_SECRET_KEY forKey:@"api_key"];
[request setPostValue:accessToken forKey:@"auth_token"];
[request setData:data withFileName:fileName andContentType:@"image/jpeg" forKey:@"photo"];
任何提示? 感谢