Add Tweet / update status example
authorHarmon <Harmon758@gmail.com>
Sat, 30 Oct 2021 16:27:33 +0000 (11:27 -0500)
committerHarmon <Harmon758@gmail.com>
Sat, 30 Oct 2021 16:28:00 +0000 (11:28 -0500)
examples/update_status.py [new file with mode: 0644]

diff --git a/examples/update_status.py b/examples/update_status.py
new file mode 100644 (file)
index 0000000..7610908
--- /dev/null
@@ -0,0 +1,25 @@
+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)
+
+# Tweet / Update Status
+
+# The app and the corresponding credentials must have the Write perission
+
+# Check the App permissions section of the Settings tab of your app, under the
+# Twitter Developer Portal Projects & Apps page at
+# https://developer.twitter.com/en/portal/projects-and-apps
+
+# Make sure to reauthorize your app / regenerate your access token and secret 
+# after setting the Write permission
+
+api.update_status("This Tweet was Tweeted using Tweepy!")