title: can't get access token with code
body: <p>I'm using javascript sdk for user login</p>
  
  <pre><code>FB.init({appId: applicationId, status: true, cookie: true, xfbml: true, oauth: true});
  FB.login(callbackFunction, {scope:permissions});
  </code></pre>
  
  <p>i get valid access token in authResponse, and also a signed cookie is set, which decoded has code.</p>
  
  <p>according to documentation access token could be retrieved with </p>
  
  <p><a href="https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&amp;redirect_uri=YOUR_URL&amp;client_secret=YOUR_APP_SECRET&amp;code=THE_CODE_FROM_ABOVE" rel="nofollow">https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&amp;redirect_uri=YOUR_URL&amp;client_secret=YOUR_APP_SECRET&amp;code=THE_CODE_FROM_ABOVE</a></p>
  
  <p>when i try this with the code i receive error <strong>Error validating verification code. 100</strong></p>
  
  <p>as redirect_uri i've tried uri that is set as App Domain and siteURL. these give that error. with other uri i get <strong>Invalid redirect_uri: Given URL is not permitted by the application configuration. 191</strong></p>
  
  <p>Am i here mixing client-side flow and server-side flow in bad way or should i use some redirect_uri parameter when using <code>FB.init</code> or <code>FB.login</code> and use that exact uri when getting access token by code?</p>