Follow user on Tweedy

I want to keep track of users who follow me, but I'm not familiar with Tweepy yet. I have logic, but my problem is the syntax.

    for follower in followers_list:
        if follower not in friends_list:
            to_follow.append(follower)  
            print to_follow
    for follower in to_follow:
       print follower
       api.follow(follower)

Does anyone know what I should use to keep track of people (instead of api.follow that doesn't work)

+3
source share
1 answer

Is your followers_list populated with tweet user.screen_names? If yes, there is a topic on the issue that should help you here .

The followers_list should be inside a comma-separated list, for example:

stream = tweepy.Stream(auth, StreamWatcherListener(), timeout=None)
follow_list = ['1234567890', '2345678901']
track_list = None
stream.filter(follow_list, track_list)
+4
source

All Articles