【发布时间】:2011-11-10 12:34:35
【问题描述】:
{
NSString *postUrl = @"http://api.twitter.com/1/users/profile_image.json ";
ASIFormDataRequest *request = [[ASIFormDataRequest alloc]
initWithURL:[NSURL URLWithString:postUrl]];
[request addRequestHeader:@"Authorization"
value:[oAuth oAuthHeaderForMethod:@"GET"
andUrl:postUrl
andParams:nil]];
[request setPostValue: userName forKey:@"screen_name"];
[request startSynchronous];
}
在我的应用程序中,我想显示使用此应用程序的用户的 twitter 个人资料图像,该应用程序用于将图像上传到 twitter。如何检索用户的个人资料图像?我为此使用了 url http://api.twitter.com/1/users/profile_image/:screen_name.format。和 ASIHTTP GET 方法。但它失败了。谁能帮我做到这一点?我使用的代码如上所示。
【问题讨论】:
标签: iphone objective-c ios twitter asihttprequest