我正在使用 facebook.framework 我想使用 iOS 6.0 的本机 facebook 对话框共享图像
我可以分享图像,但我想显示我的应用程序名称....就像目前它通过 ios 显示一样.... I6+ +65 想要显示应用程序名称..就像通过 xyz... 我正在使用下面的代码... ..
- (IBAction)publishButtonAction:(id)sender {
// Try and present the iOS Share Sheet
[FBDialogs
presentOSIntegratedShareDialogModallyFrom:self
initialText:@"" image:[UIImage imageNamed:@"iossdk_logo.png"]
url:[NSURL URLWithString:@"https://developers.facebook.com/ios"]
handler:^(FBOSIntegratedShareDialogResult result, NSError *error) {
NSString *alertText = @"";
if ([[error userInfo][FBErrorDialogReasonKey]
isEqualToString:FBErrorDialogNotSupported]) {
alertText = @"iOS Share Sheet not supported.";
} else if (error) {
alertText = [NSString stringWithFormat:
@"error: domain = %@, code = %d",
error.domain, error.code];
} else if (result == FBNativeDialogResultSucceeded) {
alertText = @"Posted successfully.";
}
if (![alertText isEqualToString:@""]) {
// Show the result in an alert
[[[UIAlertView alloc] initWithTitle:@"Result"
message:alertText
delegate:self
cancelButtonTitle:@"OK!"
otherButtonTitles:nil]
show];
}
}];
}