Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

GetListMembers returning only 100 users #661

Closed
matinas opened this issue May 1, 2020 · 2 comments · Fixed by #687
Closed

GetListMembers returning only 100 users #661

matinas opened this issue May 1, 2020 · 2 comments · Fixed by #687

Comments

@matinas
Copy link

matinas commented May 1, 2020

The GetListMembers call is returning only 100 members (default value for the GetListMembersPaged), because for some reason, that last call always returns the same value for next_cursor and previous_cursor, so the comparison next_cursor == previous_cursor is being always true, thus making the loop to break and return only the first page.

Don't know if it's due to a Twitter API change or something, but according to the latest docs in the Twitter API the only way to check whether we have reached the bottom of the list is by comparing next_cursor to 0:

"You will know that you have requested the last available page of results when the API responds with a next_cursor = 0"

My actual call is: auth.api.GetListMembers(None,slug,user,None,False,False)

@matinas
Copy link
Author

matinas commented May 1, 2020

Just in case it helps, for now I solved the issue by replacing:

if next_cursor == 0 or next_cursor == previous_cursor:

with:

if next_cursor == 0:

@palewire
Copy link

I am getting this bug again in version 3.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants