画像を含むリンクを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"
できます。