Take the 2-minute tour ×

I see @Cirrostratus answer at iOS 5 Twitter Framework: Tweeting without user input and confirmation (modal view controller) and it works nicely for a tweet. How would I alter this to send a DM instead?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Got it:

    NSString *dmString = @"d @RecipientTwitterName ";
    NSString *statusString = [dmString stringByAppendingString:stringForTweet];

   postRequest = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/statuses/update.json"]
                                     parameters:[NSDictionary dictionaryWithObject:statusString forKey:@"status"]

just prepend the d and your recipient's twitter name.

share|improve this answer

Your Answer


