From 6b31dbd9bd69271956c9d5185b788ddccf1a1751 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 30 Oct 2021 11:33:34 -0500 Subject: [PATCH] Add follow followers example --- examples/follow_followers.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/follow_followers.py 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() -- 2.25.1