title: Facebook API using insights php sdk
body: <p>I'm struggling pulling data with the GRAPH API in php. I am not understanding the docs that well on Facebook Developers. I also cannot find any examples to help either.
  I would like to have my API give me the following (between the first of the month and last day of the month):</p>
  
  <ul>
  <li>New Likes</li>
  <li>Visits</li>
  <li>Organic Reach (monthly totals)</li>
  <li>Organic Reach (for each day in the month)</li>
  <li>Paid Reach (monthly totals)</li>
  <li>Paid Reach (for each day in the month)</li>
  <li>Cost to date</li>
  <li>Engagement</li>
  <li>Organic Impressions </li>
  <li>Paid Impressions</li>
  </ul>
  
  <p>I have gotten as far as being able to pull data, but when I test to use the insights portions it doesn't give me data. For example I have this: </p>
  
  <pre><code>// Sets the default fallback access token so we don't have to pass it to each request
  $fb-&gt;setDefaultAccessToken('{access-token}');
  
  try {
    $response = $fb-&gt;get('/{page-id}/insights/page_impressions?since=1443650400&amp;until=1446246000', $accessToken);
    $graphEdge = $response-&gt;getGraphEdge();
  } 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;
  }
  </code></pre>
  
  <p>And it returns this: </p>
  
  <pre><code>Facebook\GraphNodes\GraphEdge Object
  (
      [request:protected] =&gt; Facebook\FacebookRequest Object
          (
              [app:protected] =&gt; Facebook\FacebookApp Object
                  (
                      [id:protected] =&gt; *******************
                      [secret:protected] =&gt; ********************
                  )
  
              [accessToken:protected] =&gt; *******************
              [method:protected] =&gt; GET
              [endpoint:protected] =&gt; /{page-id}/insights/page_impressions?since=1443650400&amp;until=1446246000
              [headers:protected] =&gt; Array
                  (
                      [Content-Type] =&gt; application/x-www-form-urlencoded
                  )
  
              [params:protected] =&gt; Array
                  (
                  )
  
              [files:protected] =&gt; Array
                  (
                  )
  
              [eTag:protected] =&gt; 
              [graphVersion:protected] =&gt; v2.5
          )
  
      [metaData:protected] =&gt; Array
          (
              [paging] =&gt; Array
                  (
                      [previous] =&gt; https://graph.facebook.com/v2.5/{page-id}/insights/page_impressions?access_token=*******************&amp;appsecret_proof=*******************&amp;since=1440968400&amp;until=1443564000
                      [next] =&gt; https://graph.facebook.com/v2.5/{page-id}/insights/page_impressions?access_token=*******************&amp;appsecret_proof=*******************&amp;since=1446159600&amp;until=1448755200
                  )
  
          )
  
      [parentEdgeEndpoint:protected] =&gt; 
      [subclassName:protected] =&gt; 
      [items:protected] =&gt; Array
          (
          )
  
  )
  </code></pre>
  
  <p>I don't see any information in there that I can use and that is just for the page_impressions. I have even changed the dates to start at July 31st before and end on October 31st and still got nothing. 
  My two questions are:
   1. What did I do wrong?
   2. How to make multiple calls to get all of the data in the list above?</p>
  
  <p>Thank you in advanced!</p>