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;
Twitter's installation files could've gotten corrupted, and the only way to fix it is by reinstalling the app. On Android, you can reinstall Twitter by doing the steps below. First, unlock your device and find the Twitter app from your app drawer.
Clear the app's data From your device's home screen, tap the Settings icon. Select Applications. Select the Twitter app, scroll down and tap Clear Data. If you've cleared your data but are still experiencing the issue, try turning your phone off and then on.
Type your Tweet (up to 280 characters) into the compose box at the top of your Home timeline, or select the Tweet button in the navigation bar. You can include up to 4 photos, a GIF, or a video in your Tweet. Select the Tweet button to post the Tweet to your profile.
Can you check your debug console to see what error is returned? Typically, those messages will be more informative. Also, if you have multiple accounts configured on your device, there is an open radar issue related to it which may apply in your case. Please check http://www.openradar.me/radar?id=5262535380959232.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With