title: "The redirect_uri URL must be absolute" error on Facebook PHP SDK
body: <p>EDIT: I have <code>http://www.example.com</code> (example being my live site) as the <strong>Site URL</strong> under basic settings. I also have <code>www.example.com</code> and <code>example.com</code>under <strong>App Domains</strong>.</p>
  
  <p>The error I'm getting is:</p>
  
  <blockquote>
    <p>The redirect_uri URL must be absolute</p>
  </blockquote>
  
  <p>My code breaks when I try to login. Here's my code for the <code>getLoginUrl()</code>:</p>
  
  <pre><code>&lt;?php
  
      $fb = new Facebook\Facebook([
          'app_id' =&gt; 'MYAPPID',
          'app_secret' =&gt; 'MYAPPSECRET',
          'default_graph_version' =&gt; 'v2.5',
      ]);
  
      $redirectURI = 'http://example.com/login-callback.php';
      $encodedRedirectURI = urlencode($redirectURI);
  
      $helper = $fb-&gt;getRedirectLoginHelper();
      $loginUrl = $helper-&gt;getLoginUrl(
              array(
                  'scope' =&gt; 'ads_management,read_insights',
                  'redirect_uri' =&gt; $encodedRedirectURI
              )
          );
  
      echo '&lt;a href="' . $loginUrl . '"&gt;Log in with Facebook!&lt;/a&gt;';
  
  ?&gt;
  </code></pre>
  
  <p>Why is this error happening?</p>