title: Sorry, something went wrong using PHP Facebook SDK trying login to get via facebook working
body: <p>I get the error every time I try to I use the loginUrl. I've done all the necessary things in facebook dev portal</p>
  <pre><code>&lt;?php
  session_start();
  require( __DIR__.'/src/Facebook/autoload.php');
  
  $fb = new Facebook\Facebook([
    'app_id' =&gt; '{}', // Replace {app-id} with your app id
    'app_secret' =&gt; '{}',
    'default_graph_version' =&gt; 'v2.5',
    ]);
  
  
  $helper = $fb-&gt;getRedirectLoginHelper();
  $permissions = ['email', 'user_posts']; // optional
  $loginUrl    = $helper-&gt;getLoginUrl($callback, $permissions);
  echo '&lt;a href=&quot;' . $loginUrl . '&quot;&gt;Log in with Facebook!&lt;/a&gt;';
  ?&gt;
  </code></pre>