Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 使用ASIHttpRequest将照片上载到Flickr_Objective C_Upload_Asihttprequest_Photo_Flickr - Fatal编程技术网

Objective c 使用ASIHttpRequest将照片上载到Flickr

Objective c 使用ASIHttpRequest将照片上载到Flickr,objective-c,upload,asihttprequest,photo,flickr,Objective C,Upload,Asihttprequest,Photo,Flickr,我正在尝试使用AsittpRequest将照片上载到Flickr。 我可以让用户授权应用程序并获得访问令牌。然后,当我尝试上传照片时,它失败了,出现以下错误 “无错误域=ASIHTTPRequestErrorDomain代码=3”身份验证 需要“UserInfo=0x9757d0{NSLocalizedDescription=Authentication 需要}” 图片是我想上传的照片 ASIFormDataRequest *request = [[[ASIFormDataRequest all

我正在尝试使用AsittpRequest将照片上载到Flickr。 我可以让用户授权应用程序并获得访问令牌。然后,当我尝试上传照片时,它失败了,出现以下错误

“无错误域=ASIHTTPRequestErrorDomain代码=3”身份验证 需要“UserInfo=0x9757d0{NSLocalizedDescription=Authentication 需要}”

图片是我想上传的照片

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"];
有小费吗?
谢谢

我不是使用flickr API的专家,但这可能会帮助您完成任务: