我正在使用 MGTwitterEngine 从 NSString 中获取配置文件,但我只得到列表中的第一个响应。将 MGTwitterEngine.m 中的方法更改为使用 screen_name 而不是 user_id 会给我一个 404 错误,使用 user_id 有效,但它只返回列表中的第一个。
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"];