0
私はファブリックを使用してTwitterログインを実装しました。しかし、私は私だけのユーザー名とユーザーIDを取得していることtwitterでユーザー名とプロフィールの画像を取得
[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error)
{
[objAppData hideLoader];
if (session)
{
[objAppData hideLoader];
NSLog(@"signed in as %@", [session userName]);
}
else
{
[objAppData hideLoader];
NSLog(@"error: %@", [error localizedDescription]);
}
}];
のコードに続いて実施している 等、プロフィール画像や電子メールアドレスなどのより多くの情報を得ていません。上のコードから。 ので、私はその
TWTRAPIClient *client = [TWTRAPIClient clientWithCurrentUser];
NSURLRequest *request = [client URLRequestWithMethod:@"GET"
URL:@"https://api.twitter.com/1.1/account/verify_credentials.json"
parameters:@{@"include_email": @"true", @"skip_status": @"true"}
error:nil];
[client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
NSLog(@"%@",data);
NSLog(@"%@",response);
NSLog(@"%@",connectionError);
}];
ために別のコードを実装しているが、まだデータとresponceにnull値を取得し、connectionErrorに(403)禁じます。