中国からのダウンロードが増えてきたので、SinaWeibo(微博)の認証方法を調査してみた。
基本的には、以前、紹介したTwitterの認証と変わらない。
#import <Accounts/Accounts.h>
ACAccountStore *aCAccountStore = [[ACAccountStore alloc] init];
ACAccountType *aCAccountType = [aCAccountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierSinaWeibo];
[aCAccountStore requestAccessToAccountsWithType:aCAccountType withCompletionHandler:^(BOOL granted, NSError *error) {
if (granted) {
NSLog(@"grandted");
}else{
NSLog(@"not grandted");
}
}];
0 コメント:
コメントを投稿