Reputation: 15078
I am using facebook.framework i want to share image using native facebook Dialog of iOS 6.0
I can share image but i want to show my app name.... like currently it showing via ios.... I6+ +65 want to show app name..Like via xyz... I am using below code.....
- (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];
}
}];
}
Upvotes: 1
Views: 1388
Reputation: 3982
Unfortunately, you can't show your App Name if you want to use Facebook.framework
and the iOS 6 default share dialog.
The only way to achieve this is to register an app on Facebook Developers and handle every connection/request using their iOS SDK.
Facebook.framework
is the most straightforward way to deal with Facebook APIs but you have to renounce to your app name. Otherwise, you can take the harder way and build your app from scratch so you'll be able to show your app name. More info here: Facebook Share Dialog.
Upvotes: 1