I'm trying to fetch information from a JSON web service with this code, using SBJsonParser API:
SBJsonParser *parser = [[SBJsonParser alloc] init];
// Prepare URL request to download statuses from Twitter
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.json"]];
// Perform request and get JSON back as a NSData object
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
// Get JSON as a NSString from NSData response
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
But I need to add to the web service URL two parameters, user and password, with their values, so the URL will be "http://twitter.com/statuses/public_timeline.json?user=name&password=test". I have searched information about APIs to do it but I wasn't successful.
Many thanks for your help.