projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6749e11
)
Add follow followers example
author
Harmon
<Harmon758@gmail.com>
Sat, 30 Oct 2021 16:33:34 +0000
(11:33 -0500)
committer
Harmon
<Harmon758@gmail.com>
Sat, 30 Oct 2021 16:33:34 +0000
(11:33 -0500)
examples/follow_followers.py
[new file with mode: 0644]
patch
|
blob
diff --git a/examples/follow_followers.py
b/examples/follow_followers.py
new file mode 100644
(file)
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()