Facebook 最近在其 Graph API 中添加了照片标记功能:http: //developers.facebook.com/blog/post/509/
我在 iPhone 上使用 FbConnect 上传图片并在其中标记我的页面。所以,我的第一个电话是:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
self.imageToPost, @"picture",
@"My caption!", @"name", @"tags",
nil];
[self.theFacebook requestWithGraphPath:@"me/photos"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
这正确返回:{ id = 2092859844825; }
然后我又打了一个电话:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
FACEBOOK_PAGE_ID,@"to",
@"160",@"x",
@"240",@"y",
nil];
[self.theFacebook requestWithGraphPath:[NSString stringWithFormat:@"%@/tags",photoId]
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
然后我得到: {contents = "OAuthException"} {contents = " (#121) Invalid photo id "}
但它希望我提供什么 ID?在 GET 方法中提交相同的请求,它没有给出错误,所以我认为 id 是正确的。有任何想法吗??