title: Python: Facebook Graph API - pagination request using facebook-sdk
body: <p>I'm trying to query Facebook for different information, for example - friends list. And it works fine, but of course it only gives limited number of results. How do I access the next batch of results? </p>
  
  <pre><code>import facebook
  import json
  
  ACCESS_TOKEN = ''
  
  def pp(o):
      with open('facebook.txt', 'a') as f:
          json.dump(o, f, indent=4)
  
  
  g = facebook.GraphAPI(ACCESS_TOKEN)
  pp(g.get_connections('me', 'friends'))
  </code></pre>
  
  <p>The result JSON does give me paging-cursors-before and after values - but where do I put it?</p>