Я использую Twitter с интеграцией IOS - 5. Для этого я использовал приложение для твитов, предоставленное Apple. Для этого я использую TWTweetComposeViewController.
Но если у меня более двух аккаунтов в твиттере. он получает мой первый аккаунт каждый раз. но я хочу, чтобы этот список моей другой учетной записи был показан мне, а затем, когда я выбираю одну из учетных записей, а затем я могу использовать его с TWTweetComposeViewController Мне нравится показывать как ниже изображение От: "имя пользователя"
Я использовал этот код:
- (IBAction)sendEasyTweet:(id)sender {
// Set up the built-in twitter composition view controller.
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];
// Set the initial tweet text. See the framework for additional properties that can be set.
[tweetViewController setInitialText:@"Hello. This is a tweet."];
[tweetViewController addImage:[UIImage imageNamed:@"Icon.png"]];
// Create the completion handler block.
[tweetViewController setCompletionHandler:^(TWTweetComposeViewControllerResult result) {
NSString *output;
switch (result) {
case TWTweetComposeViewControllerResultCancelled:
// The cancel button was tapped.
output = @"Tweet cancelled.";
break;
case TWTweetComposeViewControllerResultDone:
// The tweet was sent.
output = @"Tweet done.";
break;
default:
break;
}
[self performSelectorOnMainThread:@selector(displayText:) withObject:output waitUntilDone:NO];
// Dismiss the tweet composition view controller.
[self dismissModalViewControllerAnimated:YES];
}];
// Present the tweet composition view controller modally.
[self presentModalViewController:tweetViewController animated:YES];
}
![enter image description here](https://i.stack.imgur.com/fr03C.jpg)