title: NSURLSession error: bad URL, works in the browser
body: <p>I am fetching posts from facebook with the below session and get back 'bad url' error. When I take the same URL and open it in a browser, I get back proper JSON full of posts. What is the problem with my session? Thanks.</p>
  
  <pre><code>- (void)loadFacebookPosts
  {
      NSURLSession *session = [NSURLSession sharedSession];
      [[session dataTaskWithURL:[NSURL URLWithString:@"https://graph.facebook.com/profileid/feed?fields=message,description,caption,name&amp;access_token=appid|secret"]
              completionHandler:^(NSData *data,
                                  NSURLResponse *response,
                                  NSError *error) {
  
                  NSLog(@"error: %@", error);
                  NSLog(@"data: %@", data);
                  NSLog(@"response: %@", response);
  
              }] resume];
  }
  </code></pre>
  
  <p>Console:</p>
  
  <pre><code>2014-02-11 21:36:10.507 fbFetch [34365:310b] error: Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0xc7844f0 {NSUnderlyingError=0xc634c90 "bad URL", NSLocalizedDescription=bad URL}
  2014-02-11 21:36:10.509 fbFetch [34365:310b] data: &lt;&gt;
  2014-02-11 21:36:10.510 fbFetch [34365:310b] response: (null)
  </code></pre>