I'm wondering if I'm allowed to get a list of friends that a twitter's user follow 开发者_JAVA百科(following list) through MGTwitterEngine for Obj-C ?
If it's possible, please direct me how to do it Thanks
You're allowed. MGTwitterEngine has sample code for their methods in AppController.m. This is the method for retrieving a list of who anyone is following.
[twitterEngine getFriendIDsFor:@"username_here" startingFromCursor:-1]
ADD this to MGTwitterEngine.h along with followers methods
- (NSString *)getFollowingIncludingCurrentStatus:(BOOL)flag;
AND this to MGTwitterEngine.m along with followers methods
- (NSString *)getFollowingIncludingCurrentStatus:(BOOL)flag
{
NSString *path = [NSString stringWithFormat:@"statuses/friends.%@", API_FORMAT];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
if (!flag) {
[params setObject:@"true" forKey:@"lite"]; // slightly bizarre, but correct.
}
return [self _sendRequestWithMethod:nil path:path queryParameters:params body:nil
requestType:MGTwitterFollowedTimelineRequest
responseType:MGTwitterUsers];
}
精彩评论