【发布时间】:2013-04-14 01:03:23
【问题描述】:
我正在开发一个应用程序,我想使用 SLRequest 在 Twitter 上发帖。我已经让它在模拟器上工作,但它不能在我的设备上工作。
[self.accountStor accountsWithAccountType:accountTypeTwitter];
在我的设备上返回一个空数组,但它会在模拟器上显示正确的帐户。我不知道为什么会这样。
我有一个获取用户 Twitter 帐户的方法。它看起来像这样:
- (void)fetchTwitterAccounts
{
if (self.accountStore == nil) {
self.accountStore = [[ACAccountStore alloc] init];
}
ACAccountType *accountTypeTwitter = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
self.twitterAccounts = [self.accountStore accountsWithAccountType:accountTypeTwitter];
[self.tableView reloadData];
}
关于为什么我的设备上没有任何帐户的任何想法?
【问题讨论】:
标签: ios cocoa-touch twitter slrequest