Twitter в iPhone - PullRequest
       2

Twitter в iPhone

1 голос
/ 25 августа 2011

Я интегрирую твиттер API (OAuth + MGTwitter).Я могу войти и получить все твиты всех людей, за которыми я следую.Теперь я хочу получать твиты только с одного аккаунта (людей).Как я могу получить все твиты кем-то?

Описание: Предположим, я хочу видеть только твиты @ XXX_123.

Код: `

#pragma mark UITableViewDataSource Methods 

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return [tweets count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    NSString *identifier = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];

    if(!cell) {

        cell = [[UITableViewCell alloc] initWithStyle:UITableViewStyleGrouped reuseIdentifier:identifier];
        //[cell setBackgroundColor:[UIColor clearColor]];
    }

    [cell.textLabel setNumberOfLines:7];
    [cell.textLabel setText:[(Tweet*)[tweets objectAtIndex:indexPath.row] tweet]];

    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    return 150;
}

`

Привет !!

1 Ответ

1 голос
/ 25 августа 2011

Вы должны использовать различные методы, предоставленные моим MGTwitter, чтобы получить различные результаты.Для получения твитов определенного человека

twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];<br> [twitterEngine getUserTimelineFor:username sinceID:0 startingAtPage:0 count:15];

Где username - это пользователь, которого вы хотите получить из

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...