title: Avoiding error 100: invalid parameter (requires valid redirect URI) in application requests dialog
body: <p>I'm developing a game for Facebook. I need a way for users to invite others to the game. For that, I use the apprequests dialog. I redirect the user to the dialog URL, which I glue together like this:</p>
  
  <pre><code>$url = "http://www.facebook.com/dialog/apprequests?app_id=".$id."&amp;message=".urlencode("foobar")."&amp;redirect=".urlencode("http://some.arbitrary.url.com");
  </code></pre>
  
  <p>(Of course, with not-so-arbitrary arguments, but they still look sane to me.) Upon navigating there, the user is scolded by "API Error Code: 100, API Error Description: Invalid Parameter, Error Message: Requires valid redirect URI.". I googled around for a solution, but it seems that all the people receiving this error were forgetting to escape their URLs / messages. I also tried some URLs that should be accepted without remarks, like the application canvas URL. </p>
  
  <p>Does anyone know what mistakes am I making?</p>