Get followers/ids returns invalid user_id's (user not found)


#1

I am retrieving a list of followers using ‘get followers/ids’. The list contains valid users for the most part, but a non-trivial number of them are invalid. The same invalid users are returned day after day. This happens even when I run CURL ‘get followers/ids’ from the command line. I find it difficult to believe that twitter would return invalid ids… and yet I cannot seem to find a different explanation. Can somebody please explain where I am going wrong? I simply want to use ‘users/show’ and possibly ‘friendships/create’ using the follower id. Thank You!


#2

Are you able to share any of the example user IDs?

My hypothesis here is that since user IDs became snowflake IDs, it might be possible that your script is not handling the large integers correctly? If this applies to non-snowflake IDs, then this idea would not be a valid explanation.


#3

Hello Andy,

I have this problem as well in a simple Python app using the Tweepy module as follows:

(i) retrieve ids of all those I follow via several API calls using cursor (~22,000)
(ii) retrieve ids of all those following me via several API calls using cursor (~20,000)
(iii) find “my fans” i.e. those who follow me but I don’t follow back by subtracting the set of those I’m following from the set of those following me

This should be a very small number, usually less than 10, as I have nearly 100% mutual following. This is from my app just now but I have I had to write a function to get to 5 correct “fans” from the originally computed 88.

Following = 22502
Followers = 20627
Mutual Followback = 20539
Fans = 5

You’ll see that these numbers don’t add up as 20539 + 5 is 20544 which is 83 less than the 20627 you would expect.

The reason for the difference is that the number of “fans” calculated in the set operation is 88 as expected but 83 of these are not valid. Attempts to create_friendship with one of the 83 gives “TweepError: [{u’message’: u’Cannot find specified user.’, u’code’: 108}]” and an attempt to lookup_users on one of these gives “TweepError: [{u’message’: u’No user matches for specified terms.’, u’code’: 17}]”

The current 83 problem ids are:

[744966960434262016L,
747520298858221568L,
748418788790534144L,
747183600685223936L,
718710100462940160L,
3298912008L]

Regards,

Peter


#4

For brevity I only included 6 of the 83.


#5

All those users are suspended, so that’s expected behaviour from the API. users/show returns a more informative error.