IOS7 - SLComposeViewController - Error sending to Twitter - unable to send a tweet connection

I am trying to write Twitter using IOS7 SLComposeViewController and I get the following error -

Tweet "blah blah" could not be sent because the connection to twitter failed.

I include the image and URL in my tweet - if that matters.

The code below is

 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; 
+6
source share
1 answer

You can check the debug console to see which error is being returned? As a rule, these messages will be more informative. In addition, if you have multiple accounts configured on your device, there is a problem with the open radar associated with it, which may apply in your case. Check out http://www.openradar.me/radar?id=5262535380959232 .

+4
source

Source: https://habr.com/ru/post/958086/


All Articles