1

我想要成功认证后最近 20 个 screen_name 状态。

我已成功完成身份验证。

这是我用于检索推文的代码:

- (void)listResults
  {
    NSLog(@"list");
    dispatch_async(GCDBackgroundThread, ^{
    @autoreleasepool {
        [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;


         dict = [[FHSTwitterEngine sharedEngine]searchTweetsWithQuery:@"@uknationofblue" count:30 resultType:FHSTwitterEngineResultTypeRecent unil:nil sinceID:nil maxID:nil];

                   NSLog(@"%@",dict);
        NSArray *results = [dict objectForKey:@"statuses"];

        NSLog(@"array text = %@",results);
            for (NSDictionary *item in results)
    {
            NSLog(@"text == %@",[item valueForKey:@"text"]);
            NSLog(@"name == %@",[[item objectForKey:@"user"]objectForKey:@"name"]);
            NSLog(@"screen name == %@",[[item objectForKey:@"user"]objectForKey:@"screen_name"]);
           NSLog(@"pic == %@",[[item objectForKey:@"user"]objectForKey:@"profile_image_url_https"]);
        }

        dispatch_sync(GCDMainThread, ^{
           @autoreleasepool {
                UIAlertView *av = [[UIAlertView alloc]initWithTitle:@"Complete!" message:@"Your list of followers has been fetched" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
                [av show];
                [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
            }
        });
    }
  });
  }
4

0 回答 0