Search code examples
iosfacebook-ios-sdkfacebook-sdk-3.0fbdialogs

FBDialogs retrieve post_id on success


I am sharing a link using FBDialogs and as part of the tracking i want to give post_id of that shared post back to the server.

How can I retrieve post_id on success

[FBDialogs presentShareDialogWithLink:params.link
           name:params.name
           caption:params.caption
           description:params.description
           picture:params.picture
           clientState:nil
           handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
               if(error) {
               // An error occurred, we need to handle the error
               // See: https://developers.facebook.com/docs/ios/errors
               NSLog(@"%@",[NSString stringWithFormat:@"Error publishing story: %@", error.description]);
               } else {
               // Success
               NSLog(@"result %@", results);

               }
}];

There is nothing in the results Dictionary

Thanks


Solution

  • I believe the reason for there not being any information about the post in the result dictionary is that Facebook does not want app developers to know if there indeed was a post made.

    Users can abort posting something but to the app it is still reported as success.