title: Facebook PHP SDK 4.0 : Getting Long Term Access Token
body: <p>I'm trying to use the PHP sdk v4.0 to get a long term access token for PAGE management.</p>
  
  <p>I'm grabbing the access token from the user's login (Yes, I'm grabbing the Page-specific access token). Then sending it to the endpoint as specified in documentation, but I'm not getting any results and I'm not getting any errors.</p>
  
  <p>Could I know what is the correct code snippet to use?</p>
  
  <p>This is the code I'm using so far</p>
  
  <pre><code>$endpoint   =   '/oauth/access_token?';
  $endpoint   .=  'grant_type=fb_exchange_token&amp;';
  $endpoint   .=  'client_id='.$this-&gt;app_id.'&amp;';
  $endpoint   .=  'client_secret='.$this-&gt;app_secret.'&amp;';
  $endpoint   .=  'fb_exchange_token='.$access_token;
  
  try {
  
      $response = (new FacebookRequest(
          $this-&gt;session, 'GET', $endpoint
      ))-&gt;execute();
  
      // Do something with the response here but response is empty
  
  } catch (FacebookRequestException $ex) {
  
      echo $ex-&gt;getMessage();
  
  } catch (\Exception $ex) {
  
      echo $ex-&gt;getMessage();
  
  }
  </code></pre>