'Get all pages from a get_connections call
This will iterate over all pages returned by a get_connections call
and yield the individual items.'

def get_all_connections(self, id, connection_name, **args):

    while True:
        page = self.get_connections(id, connection_name, **args)
        for post in page['data']:
            (yield post)
        next = page.get('paging', {}).get('next')
        if (not next):
            return
        args = parse_qs(urlparse(next).query)
        del args['access_token']
