MGTwitterEngine: GetBulkUserInformationFor:
I'm using MGTwitterEngine to grab profiles from an NSString but I only get the first response in the list. Changing the method in MGTwitterEngine.m to use screen_name instead of user_id gives me a 404 error, using user_id works, but it only returns the first in the list.
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
My method:
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier {
for(NSDictionary *d in userInfo) {
NSLog(@"dee: %@", d);}
.. and my call:
[_engine getBulkUserInformationFor:@"14483463,25552002,1540791,307428962,61605222"];
sounds like a similiar problem to this issue on the github page for mgtwitterengine:
https://github.com/mattgemmell/MGTwitterEngine/issues/58
change
#define TWITTER_DOMAIN @"twitter.com"
to
#define TWITTER_DOMAIN @"api.twitter.com/1"
in MGTwitterEngine.m
精彩评论