最後に、私はそれに関する情報を見つけました。 このシナリオを検討してください: 私たちのアプリは既にユーザーによって承認されており、アクセストークンと秘密の両方があります。今度は、新しいiOS 6の機能をサポートし、設定でtwitter(たとえば)アカウントを作成したいと考えています。これを行うには、これらのトークンをセントラルアカウントストアに移行する必要があります。それについての詳細は
- (void)storeAccountWithAccessToken:(NSString *)token secret:(NSString *)secret {
//We start creating an account by creating the credentials object
ACAccountCredential *credential = [[ACAccountCredential alloc] initWithOAuthToken:token tokenSecret:secret];
ACAccountType *twitterAcctType =[self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
ACAccount *newAccount = [[ACAccount alloc] initWithAccountType:twitterAcctType];
//Here we assign credentials and now can save account
newAccount.credential = credential;
[self.accountStore saveAccount:newAccount withCompletionHandler:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"the account was saved!");
}
else {
//Handle error here
}
}];
}
あなたは私の人生を節約できます:)私からここhow to migrate tokens
1を読んで:):ここ の方法です – RayofHope