Get json from Twitter API in iPhone using JSON Framework
Posted
by jozei
on Stack Overflow
See other posts from Stack Overflow
or by jozei
Published on 2010-04-07T14:07:52Z
Indexed on
2010/04/07
14:13 UTC
Read the original article
Hit count: 618
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.
© Stack Overflow or respective owner