我刚刚通过 Facebook SDK 将照片上传到我的个人墙上。 当我跟踪“request:didLoad”方法时,我只得到“id”和“post_id”。 这是我所有必要的方法:
-(void) postPhoto:(UIButton*)button{
UIImage *uploadImage = [UIImage imageNamed:@"testImage"];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
uploadImage, @"source",
@"test caption", @"message",
nil];
[self.facebook requestWithGraphPath:@"/me/photos" andParams:params andHttpMethod:@"POST" andDelegate:(id)self];
}
- (void)request:(FBRequest *)request didLoad:(id)result{
NSLog(@"Request didLoad: %@", result);
}
输出:
Request didLoad: { id = 3273804256400; "post_id" = "1608527600_3273799016300"; }
所以,我想知道为什么没有关于 Photo 的更多信息? 我以为我会取回各种照片字段?
最佳答案
要获取有关照片的更多信息,您需要执行另一个请求。如果您对 id 发出图形请求,您将获得信息。例如,您可以调用 https://graph.facebook.com/3273804256400并接收照片中标记的人物、点赞、评论等信息。
Facebook 假设,如果您发布了照片,您不需要知道有关它的信息,这就是为什么他们只给您 id 和 post_id。
关于iphone - Facebook SDK : How to i get the photo properties after posting an image?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10176665/