title: Bypass Facebook login to make graph api request using PHP SDK v5
body: <p>I am in the process of developing a system that requires the use of the Facebook Graph API. I have read up on the documentation and installed the PHP SDK in order to make requests. However the system I am developing will run as a cron at night. </p>
  
  <p>The documentation implies that in order to perform requests a user must login so an access token can be generated for requests to be made. As it will run at night this is not possible. Is there any way around this so no user has to login but a request can still made?</p>
  
  <p>The code I currently have is below:</p>
  
  <pre><code>$fb = new Facebook\Facebook([
    'app_id' =&gt; '123456789101112',
    'app_secret' =&gt; 'thisisasecret',
    'default_graph_version' =&gt; 'v2.5',
  ]);
  </code></pre>
  
  <p>To give some context the request I am trying to make will pull off a list of comments made on a group. The code in the block below has been taken from the Graph API Explorer when the get code button is clicked.</p>
  
  <pre><code>$request = new Facebook\FacebookRequest(
    'GET',
    '/123456789_123456789',
    array(
      'fields' =&gt; 'comments.filter(stream).limit(50){message,id,from,parent}'
    )
  );
  //$page .= $request;
  //$response = $request-&gt;execute();
  $response = $request;
  //$graphObject = $response-&gt;getGraphObject();
  $graphObject = $response-&gt;getGraphVersion();
  //$getDecodedBody = $response-&gt;getDecodedBody();
  /* handle the result */ 
  </code></pre>
  
  <p>A secondary issue as well is that <code>$response = $request-&gt;execute();</code> is no longer available in the V5 SDK so I am unsure how the request will actually be made and how I can then get the results that are returned.</p>