views:

334

answers:

0

Hello now I'm trying to get json data from Twitter API using iPhone. I'm using JSON Framework. This code has good results.

#import "JSON/JSON.h"
NSString *urlString= @"http://api.twitter.com/1/statuses/public_timeline.json";
NSURL *url = [NSURL URLWithString:urlString];
NSString *jsonString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
NSLog(@"%@", jsonString);

But when I change API's URL like "http://search.twitter.com/trends/current.json" the above code gets SIGABRT error.

Could someone explain it to me?

Thanks.