Add follow followers example
authorHarmon <Harmon758@gmail.com>
Sat, 30 Oct 2021 16:33:34 +0000 (11:33 -0500)
committerHarmon <Harmon758@gmail.com>
Sat, 30 Oct 2021 16:33:34 +0000 (11:33 -0500)
examples/follow_followers.py [new file with mode: 0644]

diff --git a/examples/follow_followers.py b/examples/follow_followers.py
new file mode 100644 (file)
index 0000000..0c49a34
--- /dev/null
@@ -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()