当我尝试使用 presentOSIntegratedShareDialogModallyFrom 在 Facebook 上分享时,我看不到应用名称。我使用以下代码:
[FBSettings setDefaultDisplayName:[[FBSettings defaultDisplayName] precomposedStringWithCanonicalMapping]];
FBLinkShareParams *params = [[FBLinkShareParams alloc] init];
params.link = [NSURL URLWithString:[arrDetailsOfTour valueForKey:@"WebAddress"]];
params.picture = [NSURL URLWithString:[arrDetailsOfTour objectForKey:@"ImageUrl"]];
params.name = [NSString stringWithFormat:@"%@",[arrDetailsOfTour valueForKey:@"CompanyName"]];
[FBDialogs presentOSIntegratedShareDialogModallyFrom:self initialText:[NSString stringWithFormat:@"%@",[arrDetailsOfTour valueForKey:@"CompanyName"]] image:toursImageView.image url:[NSURL URLWithString:[arrDetailsOfTour valueForKey:@"WebAddress"]] handler:^(FBOSIntegratedShareDialogResult result, NSError *error) {
if(error) {
NSLog(@"Error: %@", error.description);
} else {
NSLog(@"Success!");
}
}];
但我无法在帖子中看到应用名称。我已将 Facebook 显示名称放在 plist 中,但仍然没有显示。请帮忙。