我已在我的应用程序中将 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);
}
}
}
}];
谁能帮我解决这个问题?