2012-02-08 16 views
0

後、私は友人のリストを取得するためにMGTwitterEngine.mから以下の方法を使用しました:Twitterのフレンドリストを取得真偽

(NSString *)getFriendsIds:(NSString *)twitterID 
{ 
    NSString *path = [NSString stringWithFormat:@"friends/ids.%@", API_FORMAT]; 

    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0]; 
    [params setObject:twitterID forKey:@"user_id"]; 

    return [self _sendRequestWithMethod:nil path:path queryParameters:params body:nil 
          requestType:MGTwitterUserInformationRequest 
          responseType:MGTwitterUsers]; 
} 

そして、私のクラスでは、私は次の呼び出し作った:

NSLog(@"friends %@",[_engine getFriendsIds:@"user_id"]); 

友だちリストを取得できませんでした。

+0

申し訳ありませんが、あなたは英語で再度質問する必要があります。 Posez la laànouveau en anglais。 – Ray

+0

おそらく私は彼のためにそれを翻訳することができます、私たちが話すようにそれを行う。 –

+1

私は完全な編集権を握っていないので、OPは変更を受け入れなければならないだけです。 @ user1195279あなたの質問や質問には、質問と回答が含まれていますので、お気軽にご意見をお寄せください。 –

答えて

1
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier { 

    //NSLog(@"User Info Received: %@", userInfo); 

    followTweet = [[TweetFollow alloc]initWithStyle:UITableViewStylePlain];//Table 

    TweetModel *tweetFollw = [[TweetModel alloc]initWithTweetFollwerArray:userInfo];//Model 
    [followTweet.tweetFollow addObject:tweetFollw]; 

    NSLog(@"ARRYYYYYY: %@",followTweet.tweetFollow); 
    followTweet.view.frame = CGRectMake(161, 0, 160, 420); 
    [self.view addSubview:followTweet.view]; 
    [tweetFollw release]; 

} 



#define TWITTER_DOMAIN @"api.twitter.com/1" // Plz change this in to MGTwitterEngin.m 

-(void)viewWillApper { 

//_engine is instance of MGTwitterEngin class 
[_engine getFollowersIncludingCurrentStatus:NO]; 

} 

これはTwitterのフレンドリストを取得する簡単なコードです。 ありがとうございます!

関連する問題