Skip to content

Instantly share code, notes, and snippets.

@mizvol
Created April 21, 2017 10:53
Show Gist options
  • Save mizvol/dce8c41456da99961863478fbd7d26d6 to your computer and use it in GitHub Desktop.
Save mizvol/dce8c41456da99961863478fbd7d26d6 to your computer and use it in GitHub Desktop.
def getFullListOfFollowers(userId):
fullFollowersList = []
response = getFollowers(userId, '')
if response.get('data') == None:
print "Access denied"
return fullFollowersList
while(1):
fullFollowersList.extend(response.get('data'))
nextCursor = response.get('pagination').get('next_cursor')
if nextCursor == None:
break
return fullFollowersList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment