title: How to pass query string parameters when sharing a link through Facebook iOS SDK?
body: <p>I am running into difficulty sharing an article link from my iOS app to Facebook using the  Facebook SDK FBWebDialogs class.  The URL of the link includes query string parameters, which I am URL encoding from my iOS app before sending to Facebook.</p>
  
  <p>Here is an example link that I am trying to share:</p>
  
  <p><a href="http://www.foo.com/message.html?s=This%20is%20a%20test%20&amp;%20an%20example" rel="nofollow">http://www.foo.com/message.html?s=This%20is%20a%20test%20&amp;%20an%20example</a></p>
  
  <p>Here is what Facebook shows as the link on my timeline:</p>
  
  <p>?s=This+is+a+test+&amp;+an+example</p>
  
  <p>Once the link is published to my Facebook timeline, Facebook appears to be stripping all URL encoding, leaving my query string void of encoding, which causes the destination web app to not receive necessary data.  Needless to say, the destination webpage has trouble  consuming the query string parameters properly if special characters (&amp;, =, etc) are not encoded properly when linked within the Facebook feed.  </p>
  
  <p>What is the proper way to share a link with querystring parameters?  Should querystring params be passed as a separate parameter, or should they be denoted somehow within the link url?  </p>
  
  <p>Below is the code relevant to setting up the share parameters.</p>
  
  <pre><code>NSString *url_param_str = [NSString stringWithFormat:@"http://www.foo.com/message.html?s=%@", @"This is a test &amp; an example"];
  
  NSString *web_url_param_str = [url_param_str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  
  NSMutableDictionary *feedParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Sharing an article", @"name",
                                             @"This is a test title", @"description",
                                             @"www.foo.com", @"caption",
                                             web_url_param_str, @"link",
                                             nil];
  </code></pre>