Tag: acaccountstore

调用时出现“Error Code 8” – iOS

我一直在search谷歌和SO,无法find什么com.apple.accounts错误代码8的手段。 我正在尝试使用iOS 6和Facebook SDK。 我运行这个请求; if (!_accountStore) _accountStore = [[ACAccountStore alloc] init]; ACAccountType *fbActType = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; NSDictionary *options = [[NSDictionary alloc] initWithObjectsAndKeys: (NSString *)ACFacebookAppIdKey, @"###############", (NSString *)ACFacebookPermissionsKey, [NSArray arrayWithObject:@"email"], nil]; [_accountStore requestAccessToAccountsWithType:fbActType options:options completion:^(BOOL granted, NSError *error) { if (granted) { NSLog(@"Success"); NSArray *accounts = [_accountStore accountsWithAccountType:fbActType]; _facebookAccount = [accounts lastObject]; } else { […]

从iOS的twitter获取用户个人资料(尤其是电子邮件地址)

我从几天以来一直在寻找如何根据他/她的Twitter帐户获取用户详细信息 。 现在首先,让我解释一下我想要做什么。 在我的情况下,用户将被提供一个选项来注册 Twitter帐户。 所以,基于用户的Twitter帐户,我想能够获得用户的详细信息(例如电子邮件ID,姓名,头像,出生date,性别等),并将这些详细信息保存在数据库中。 现在,很多人可能会build议我使用ACAccount和ACAccountStore ,这个类提供了访问,操作和存储账户的接口。 但在我的情况下,即使用户没有在iOS设置应用中为Twitterconfiguration帐户,我也想注册用户。 我希望用户导航到Twitter的login屏幕(在Safari或在App本身,或使用任何其他select)。 我也在这里提到了有API列表的Twitter的文档。 但我很困惑应该如何提供用户login屏幕login到Twitter帐户,以及如何获取个人资料信息。 我应该使用UIWebView ,还是将用户redirect到Safari或采用其他方式? 请尽可能提供一些代码片段。 在此先感谢,我绝望的解决scheme!