title: Retrieve latest posts from a Facebook group via Graph API
body: <p>I'm a moderator of a Facebook group and I'd like to write some code to retrieve the latests posts (may 10, or more) from this group.</p>
  
  <p>This is the code I wrote</p>
  
  <pre><code>require_once 'src/Facebook/autoload.php';
  
  $fbApp = new Facebook\FacebookApp('{my-app-id}', '{my-app-secret}');
  $request = new Facebook\FacebookRequest($fbApp, {AuthToken},'GET','{group-id}?limit=10');
  
  
  // Send the request to Graph
  try {
    $response = $fb-&gt;getClient()-&gt;sendRequest($request);
  } catch(Facebook\Exceptions\FacebookResponseException $e) {
  // When Graph returns an error
    echo 'Graph returned an error: ' . $e-&gt;getMessage();
    exit;
  } catch(Facebook\Exceptions\FacebookSDKException $e) {
  // When validation fails or other local issues
  echo 'Facebook SDK returned an error: ' . $e-&gt;getMessage();
  exit;
  }
  
  $graphNode = $response-&gt;getGraphNode();
  var_dump($graphNode);
  </code></pre>
  
  <p><strong>Response:</strong>
  Graph returned an error: Please reduce the amount of data you're asking for, then retry your request</p>
  
  <p>Where's the bug? 
  I googled so many sites whitout finding any real solution.</p>