title: Facebook Pagination Limit with Graph API
body: <p>this is my first post here.</p>
  
  <p>I'm trying to query all places within my city limits (Winnipeg) using geo-location data and a radius of 15,000 meters.</p>
  
  <p>This is working somewhat well with the query:</p>
  
  <pre><code>$request = new FacebookRequest(
                  $session,
                  'GET',
                  '/search?type=place&amp;limit=100&amp;center=49.89542,-97.13853&amp;distance=15000'
              );
  </code></pre>
  
  <p>The pagination afterwards works once or twice but ends up cutting me off after a variable 180-220 results. I noticed the pages returned are all from downtown (center query string) and start to spread outward, but it stops after only 2 city blocks.</p>
  
  <p>Here is the loop I have in use for iterating through additional results:</p>
  
  <pre><code>$paging = $graphObject-&gt;asArray()['paging'];
  
              $i = 0;
              while(property_exists($paging, "next") &amp;&amp; $i &lt;= $times)
              {
                  $next_url = $paging-&gt;next;
                  $json = file_get_contents($next_url);
                  $obj = json_decode($json);
  
                  foreach($obj-&gt;data as $page)
                  {
                      $page_ids[] = $page-&gt;id;
                  }
                  $paging = $obj-&gt;paging;
  
                  $i++;
              }
  </code></pre>
  
  <p>I have researched issues with API limits but nothing that comes even close to only 200-ish results.</p>
  
  <p>Is there possibly something I'm missing here?</p>