I'm trying to implement a twitter post using IOS7 SLComposeViewController
and I get the following error -
The Tweet "blah blah" cannot be sent because the connection to twitter failed.
I am including image and URL in my tweet - if that makes any difference..
code below -
SLComposeViewController *composeController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[composeController setInitialText:@"i ran with 18 chickens under my armpits for 18 hours"];
[composeController addImage:[UIImage imageNamed:@"zoeLrg.png"]];
[composeController addURL: [NSURL URLWithString:
@"http://www.nme.com"]];
[self presentViewController:composeController
animated:YES completion:nil];
SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){
if (result == SLComposeViewControllerResultCancelled) {
NSLog(@"delete");
} else
{
NSLog(@"post");
}
[composeController dismissViewControllerAnimated:YES completion:Nil];
};
composeController.completionHandler =myBlock;