Search code examples
iosobjective-ccocoa-touchfacebook-ios-sdk

Is there a way of show the FB dialog and call my own method on Post?


I'm developing an iOS app that needs to post to the user facebook timeline. I have already asked permissions to publish and everything is working fine.

I want to publish doing the following:

NSMutableDictionary *postParams = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                   @"www.google.com.ar", @"link",
                                   @"http://myimage.pn", @"picture",
                                   @"Test", @"name",
                                   @"location", @"caption",
                                   @"test.",@"description",
                                   @"message to show",@"message",
                                   nil];

[FBRequestConnection
 startWithGraphPath:@"me/feed"
 parameters:postParams
 HTTPMethod:@"POST"
 completionHandler:^(FBRequestConnection *connection,
                     id result,
                     NSError *error) {

}

But I want the user to be able to personalize the "message" and to personalize it I want to show something similar to this:

enter image description here

And when the user pushes the Post I want to grab the text the user posted and add it to my "message" dictionary and after that do the FBRequestConnection

Anyone knows if this is possible at all??

Thanks!!


Solution

  • No. The native share dialog doesn't support OpenGraph and you cannot modify the contents of it before sending them to Facebook. https://developers.facebook.com/docs/howtos/share-dialogs-ios-sdk/#ios6sharesheet