Note that there are some explanatory texts on larger screens.

plurals
  1. POSharing with iOS 6.0 native Facebook integration: "Posted via my app name"?
    primarykey
    data
    text
    <p>I have just integrated facebook into my app via ios 6 but I have an issue when posting on my wall. It simply says <strong>"post via ios app"</strong>. I want it to say <strong>"posted via the app name"</strong>. I have made an app identity with facebook and I have the app number they have assigned but I am not sure how to integrate this with facebook integration. </p> <p>Below is my code. If anyone could help, it would be appreciated. Thanks!</p> <pre><code>{ NSString *message; message= [[NSString alloc] initWithFormat:@"I've earned %@ points", [self retrieveScore]]; if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [controller setInitialText:message]; [controller addURL:[NSURL URLWithString:@"http://mysite"]]; [self presentViewController:controller animated:YES completion:Nil]; [message release]; SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){ NSString *output= nil; switch (result) { case SLComposeViewControllerResultCancelled: output= @"Action Cancelled"; NSLog (@"cancelled"); break; case SLComposeViewControllerResultDone: output= @"Post Succesfull"; NSLog (@"success"); break; default: break; } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Facebook" message:output delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; [alert release]; [controller dismissViewControllerAnimated:YES completion:Nil]; }; controller.completionHandler =myBlock; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload