iOS Twitter.framwork - twitterd session interrupted, restarting. Hang


Got a problem with the new Twitter.framework that I haven’t been able to find a solution for yet.
Here is my code:

if ([TWTweetComposeViewController canSendTweet]){
TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init];

[twitter addImage:tweetImage];
[twitter setInitialText:initalString];
[twitter addURL:url];

twitter.completionHandler = ^(TWTweetComposeViewControllerResult result) {
    if (result == TWTweetComposeViewControllerResultDone) {

        dispatch_async(dispatch_get_main_queue(), ^{
            UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Tweeted"
                                                                          message:@"You successfully tweeted"
                                                                       delegate:self cancelButtonTitle:@"OK"
            [alertView show];
            [alertView release];

    } else if (result == TWTweetComposeViewControllerResultCancelled) {
        dispatch_async(dispatch_get_main_queue(), ^{
            UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Twitter"
                                                                        message:@"Tweet has been canceled"
             [alertView show];
             [alertView release];

   dispatch_async(dispatch_get_main_queue(), ^{
       [self  dismissModalViewControllerAnimated:YES];


[self presentViewController:twitter animated:YES completion:nil];
[twitter release];


Seems to be the standard way of implementing this although I made the addition of queuing the UI stuff on the main thread. The addImage, setInitialText and addURL parameters are all good. In, fact this works most of the time. The problem I am having is that occasionally when the TWTweetComposeViewController is alloc’d init the app freezes and I can see "twitterd session interrupted, restarting… " in the console. The app will hang sometimes for only a few seconds but more often it will hang for unreasonable amount of time (20 - 30 secs or more), I will get numerous of these messages and then the twitter controller will finally slide up. Occasionally, as well, it will just hang and never come back.

Was wondering it anybody has see this problem before or has any ideas on a solution to this problem?

Thanks in advance.


The same is happening to me. Did you solve it after 25 weeks??


Not to be repetitive, but did either of you solve this? I can get the framework working fine in the iOS5 simulator, but on a real device I get the message:

ios “twitterd session interrupted, restarting”


the same is happening to me , but just when there’s no accounts configures in the


How to solve this issue can any one help me, its showing same error for me also.