1

I'm wondering if I'm allowed to get a list of friends that a twitter's user follow (following list) through MGTwitterEngine for Obj-C ?

If it's possible, please direct me how to do it Thanks

ObjProg
  • 429
  • 1
  • 7
  • 19

2 Answers2

2

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]
Nate
  • 539
  • 3
  • 14
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];
}
Tim Kozak
  • 4,026
  • 39
  • 44