2011-05-31 20 views
0

我正在使用MGTwitterEngine從NSString抓取配置文件,但我只獲得列表中的第一個響應。將MGTwitterEngine.m中的方法更改爲使用screen_name而不是user_id會給我404錯誤,使用user_id作品,但它只返回列表中的第一個。MGTwitterEngine:GetBulkUserInformationFor:

NSString *path = [NSString stringWithFormat:@"users/lookup.%@?screen_name=%@", API_FORMAT, userIDs]; 

MGTwitterEngine.m

- (NSString *)getBulkUserInformationFor:(NSString *)userIDs{ 

if (!userIDs) { 
    return nil; 
    } 

NSString *path = [NSString stringWithFormat:@"users/lookup.%@?user_id=%@", API_FORMAT, userIDs]; 
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0]; 

return [self _sendRequestWithMethod:nil path:path queryParameters:params body:nil requestType:MGTwitterBulkUserInformationRequest responseType:MGTwitterUsers];} 
enter code here 

我的方法:

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

    for(NSDictionary *d in userInfo) { 
    NSLog(@"dee: %@", d);} 

..和我的電話:

[_engine getBulkUserInformationFor:@"14483463,25552002,1540791,307428962,61605222"]; 

回答