mardi 24 février 2015

Facebook iOS SDK , share an image with a caption using ShareDialog (not GraphAPI)

I'm using following code to share a picture to Facebook using ShareDialog. However I'm unable to set a caption to this. params does not have a property for a caption.



FBPhotoParams *params = [[FBPhotoParams alloc] init];

params.photos = @[image]; // this is an UIImage instance.


[FBDialogs presentShareDialogWithPhotoParams:params
clientState:nil
handler:^(FBAppCall *call,
NSDictionary *results,
NSError *error) {
if (error) {
NSLog(@"Error: %@",
error.description);
} else {
NSLog(@"Success!");
}
}];


However there's a different method to share a status update with a picture, but this methods allows to share an image as a web link.



presentMessageDialogWithLink:name:caption:description:picture:clientState:handler:


I want to share a local UIImage just like in my first approach, with a caption. Is this possible?


Aucun commentaire:

Enregistrer un commentaire