title: Error when including redirect_uri with getLoginUrl (Facebook PHP SDK)
body: <p>I want the user to be redirected to a particular webpage after logging in using Facebook. I created a <code>LoginUrl</code> using Facebook PHP SDK and the user clicks on this link to log in. I followed <a href="http://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/" rel="nofollow">http://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/</a> when using the <code>$facebook-&gt;getLoginUrl()</code></p>
  
  <p><strong>Problem</strong>: If I were to include the <code>redirect_uri</code> parameter, Facebook gives me an error <code>An error occurred. Please try again later.</code> The login url works fine without including the <code>redirect_uri</code>. </p>
  
  <p>Anyone knows how to fix this? Thanks!</p>
  
  <p><strong>Non-working PHP Code</strong></p>
  
  <pre><code>$loginUrl = $facebook-&gt;getLoginUrl(array(
          "scope" =&gt; "email,user_education_history,user_work_history",
          "redirect_uri" =&gt; "http://mydomain.com/login/facebook"
      ));
  </code></pre>
  
  <p><strong>Working PHP Code</strong></p>
  
  <pre><code>$loginUrl = $facebook-&gt;getLoginUrl(array(
          "scope" =&gt; "email,user_education_history,user_work_history",
      ));
  </code></pre>