0

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?

Community
  • 1
  • 1
Dean Davids
  • 4,174
  • 2
  • 30
  • 44

1 Answers1

0

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"]
                                  requestMethod:TWRequestMethodPOST];

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

Dean Davids
  • 4,174
  • 2
  • 30
  • 44