From: Harmon Date: Sat, 30 Oct 2021 16:33:34 +0000 (-0500) Subject: Add follow followers example X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6b31dbd9bd69271956c9d5185b788ddccf1a1751;p=tweepy.git Add follow followers example --- diff --git a/examples/follow_followers.py b/examples/follow_followers.py new file mode 100644 index 0000000..0c49a34 --- /dev/null +++ b/examples/follow_followers.py @@ -0,0 +1,16 @@ +import tweepy + + +consumer_key = "" +consumer_secret = "" +access_token = "" +access_token_secret = "" + +auth = tweepy.OAuthHandler(consumer_key, consumer_secret) +auth.set_access_token(access_token, access_token_secret) + +api = tweepy.API(auth) + +# Follow every follower of the authenticated user +for follower in tweepy.Cursor(api.get_followers).items(): + follower.follow()