【发布时间】:2014-01-19 15:20:55
【问题描述】:
NSURL *followingURL = [NSURL URLWithString:@"https://api.twitter.com/1.1/lists/list.json"];
NSDictionary *parameters= [NSDictionary dictionaryWithObjectsAndKeys:account.username,@"screen_name", nil];
SLRequest *twitterRequest =[SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:followingURL parameters:parameters];
[twitterRequest setAccount:account];
[twitterRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
if (error) {
//DEAL WITH THE ERROR
}
NSError *jsonError =nil;
NSDictionary *twitterFriends = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONWritingPrettyPrinted error:&jsonError];
[accountDictionary setObject:[twitterFriends objectForKey:@"screen_name"] forKey:@"screen_name"];
NSLog(@"%@", accountDictionary); }
];
我正在使用此代码,但我的应用程序崩溃了。所以任何进一步的帮助将不胜感激
【问题讨论】:
-
如果你告诉它崩溃的位置和方式会更有帮助。
标签: ios iphone objective-c twitter