Trying to parse twitter trends

Posted by timothy5216 on Stack Overflow See other posts from Stack Overflow or by timothy5216
Published on 2009-11-29T19:59:55Z Indexed on 2010/05/23 19:41 UTC
Read the original article Hit count: 411

Filed under:
|
|
|

Im trying to parse twitter trends but i keep getting a parser error at "as_of". anyone know why this is happening?

EDIT:

Here is the code im using

NSMutableArray *tweets;
tweets = [[NSMutableArray alloc] init];
NSURL *url = [NSURL URLWithString:@"http://search.twitter.com/trends/current.json"];
trendsArray = [[NSMutableArray alloc] initWithArray:[CCJSONParser objectFromJSON:[NSString stringWithContentsOfURL:url encoding:4 error:nil]]]; 

NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];

for (int i = 0; i < [trendsArray count]; i++) {
    dict = [[NSMutableDictionary alloc] init];
    //[post setObject: [[currentArray objectAtIndex:i] objectForKey:@"query"]];
    [dict setObject:[trendsArray objectAtIndex:i] forKey:@"trends"];
    //[dict setObject:[trendsArray objectAtIndex:i] forKey:@"query"];
    //[post setObject:[trendsArray objectAtIndex:i] forKey:@"as_of"];
    [tweets addObject:dict];
    //post = nil;
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c