我想将包含图片的链接发布到 Facebook 时间线:
UIImage *img = [UIImage imageNamed:@"1.png"];
self.postParams =
[[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"Here we go", @"message",
@"https://developers.facebook.com/ios", @"link",
UIImagePNGRepresentation(img), @"picture",
@"Facebook SDK for iOS", @"name",
@"Build great social apps and get more installs.", @"caption",
@"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps.", @"description",
nil];
[FBRequestConnection startWithGraphPath:@"me/feed" parameters:self.postParams HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:@"Link is posted" result:result error:error];
}];
UIImage 没有发布。你能帮助我吗?
但只要我使用:
@"https://developers.facebook.com/attachment/iossdk_logo.png", @"picture"
有用。