I want to update the iOS application to take advantage of the integration of iOS 6 Facebook. I am currently using the Facebook dialog. I like how I can present the dialogue to the user, and when he publishes it, there is an icon for my application and a small tag that says "through my application name" that refers to my application.
With the integration of iOS 6 Facebook, he says βvia iOSβ and a link to the Apple website. Is there a way to achieve the same result using the integration of iOS 6 Facebook?
current code:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"1234567890", @"app_id", @"http://www.mywebsite.com/page5/page5.html", @"link", picLink, @"picture", countDownName, @"name", @"My app name", @"caption", @"For the iPhone and iPod Touch", @"description", theMessage, @"message", theFriendID, @"to", @"Share on Facebook", @"user_message_prompt", nil]; [facebook dialog:@"feed" andParams:params andDelegate:self];
my iOS 6 code (taken from a sample Facebook code)
BOOL displayedNativeDialog = [FBNativeDialogs presentShareDialogModallyFrom:self initialText:initialText image: [UIImage imageNamed: @"myImage.png"] url:url handler:nil]; if (!displayedNativeDialog) { [self performPublishAction:^{ // otherwise fall back on a request for permissions and a direct post [FBRequestConnection startForPostStatusUpdate:message completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { [self showAlert:message result:result error:error]; self.buttonPostStatus.enabled = YES; }]; self.buttonPostStatus.enabled = NO; }];
source share