3
在我的应用程序中,我想显示Twitter帐户的所有列表,并允许用户选择其中一个发送推文。如何从选定的帐户发送推文?可能吗?这是我的代码。我发送的数据,但它总是使用第一个帐户...如何发送来自所选Twitter帐户的推文
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
ACAccount *twitterAccount = [[accountStore accountsWithAccountType:accountType] objectAtIndex:0];
NSString *userName = [twitterAccount username];
NSLog(@"%@", userName);
TWTweetComposeViewController *twitter =
[[TWTweetComposeViewController alloc] init];
[twitter setInitialText:@"Hello"];
[twitter addURL:[NSURL URLWithString:_baseUrl]];
[tableViewController presentViewController:twitter animated:YES completion:nil];
我必须+1这个辉煌,虽然意外使用“twit” – 2012-07-25 14:23:13
ontopic:@Radislav,你到目前为止尝试过什么?纯粹的代码写入请求是堆栈溢出的主题 - 但我们会很乐意帮助您自己写!告诉我们[您尝试过的](http://whathaveyoutried.com),以及您卡在哪里。 – 2012-07-25 14:27:06
我已更新我的问题 – Radislav 2012-07-25 14:30:44