现在正在为 iPad 制作 Facebook 应用程序。我目前正在将用户的墙加载到 tableview 中。问题是当它遇到图像时,Facebook 正在重新调整图像的低分辨率。所以为了解决这个问题,我找到了这个答案,但是我将如何在 iOS SDK 中做到这一点?因为当我得到 Facebook 结果然后确定对象 ID,然后重新查询 Facebook 时,我如何将它们放入 NSArray 中,就像上面的答案中提到的那样。谢谢。
问问题
89 次
1 回答
1
很简单,它以 NSArray 的形式交付给您!您只需要知道如何从结果对象访问它:
- (void)request:(FBRequest *)request didLoad:(id)result {
// here's the array
NSArray *images = [result objectForKey:@"images"];
//then here's some bonus code for looping through them
for (NSDictionary *image in images) {
NSLog(@"source url=%@", [image objectForKey:@"source"]);
//height and width parameters are also available
}
}
于 2012-05-28T21:17:42.963 回答