在ios中以编程方式关闭FBWebDialogs

时间:2015-12-14 08:15:25

标签: ios facebook fbwebdialogs

我已将facebook SDK与版本3.17.1集成到我的应用程序中,我无法以编程方式解除FBWebDialogs,我尝试了此链接中提供的解决方案:"https://stackoverflow.com/questions/21741101/how-to-dismiss-fbwebdialogs"但没有用。

提供FBWebDialogs的代码片段:

[FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
     {
         DLog(@"FBSESSION IS : %@", FBSession.activeSession);
         if (error) {
             // An error occurred, we need to handle the error
             // See: https://developers.facebook.com/docs/ios/errors
             DLog(@"%@",[NSString stringWithFormat:@"Error publishing story: %@", error.description]);
         } else {
             if (result == FBWebDialogResultDialogNotCompleted) {
                 // User canceled.
                 DLog(@"User cancelled.");
             } else {
                 // Handle the publish feed callback
                 NSDictionary *urlParams = [self parseURLParams:[resultURL query]];

                 if (![urlParams valueForKey:@"post_id"]) {
                     // User canceled.
                     DLog(@"User cancelled.");

                 } else {
                     // User clicked the Share button
                     NSString *result = [NSString stringWithFormat: @"Posted story, id: %@", [urlParams valueForKey:@"post_id"]];
                     DLog(@"result %@", result);
                 }
             }
         }
     }];

任何人都可以帮我解决这个问题吗?

0 个答案:

没有答案