I\'m trying to implement the new social framework in iOS6, and have it working, except for 2 weird problems. If I\'ve enabled the services I\'m interested in (say... FaceBook),
I had the same problem, i fixed it by removing the If statement:
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
Then the view will display although there is no Facebook/Twitter account configured in the settings. And the "No Facebook/Twitter accounts" alertView showed! And I was able to hit the "Settings" button on the alert, and it directed me to the settings (Configure Facebook/Twitter account in the settings)
This is the code I used, and it works perfectly for me:
- (IBAction)bTwitter:(id)sender {
mySLComposerSheet = [[SLComposeViewController alloc] init];
mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[mySLComposerSheet setInitialText:@""];
[mySLComposerSheet addImage:[UIImage imageNamed:@""]];
[self presentViewController:mySLComposerSheet animated:YES completion:nil];
}