2012-01-13 9 views
1

Twitterアカウントへのアクセスが許可されたら、Twitterプロフィールの写真を得る手助けが必要です。以下のコードは私にプロファイルハンドル(@twitter)を与えます。 iOS5のTwitterから直接この情報を引き出す方法はありますか?ここでTwitterのプロフィールを取得するPic iPhone iOS5

は、ハンドルのために働くこと私が持っているものです。

-(void)getTwitterName 
{ 
    ACAccountStore *accountStore = [[ACAccountStore alloc] init]; 
    ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; 

    [accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) 

    { 
     if(granted) { 
      NSArray *accountsArray = [accountStore accountsWithAccountType:accountType]; 

} 
} 

答えて

2

あなたはこのURLからそれを得ることができます:http://api.twitter.com/1/users/profile_image/:screen_name.format

マイプロフィール画像は、例えば、http://api.twitter.com/1/users/profile_image/don_kim

することができますでしょう詳しくはhereを読んでください。

+0

Objective Cでサンプルを取得する方法のサンプルを提供できますか? https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger – Eric

+0

私のコメントを無視して、それは超簡単です。ありがとう! – Eric

+0

@エリック:どうしたらいいですか? –

関連する問題