python - Facebook API: how to paginate comments -
i use facebook-sdk witn python 3 http://facebook-sdk.readthedocs.io/en/latest/api.html
i can paginate posts time:
paging_next = gp.get_connections(url, 'feed', until=timestamp_until_list[1], **kwargs)['paging']['next']
but comments doesn't have until, have ['paging']['cursors']['after'] , ['paging']['cursors']['before']. when try next
paging_next = gp.get_connections(id=post_id, connection_name='comments', limit=100, **kwargs)['paging']['cursors']['after'] # working, result 'mqzdzd'
then pass 'mqzdzd':
paging_next2 = gp.get_connections(id=post_id, connection_name='comments', after=paging_next, **kwargs)
result empty list []
what doing wrong?
Comments
Post a Comment