Twitter Automation to set a progress bar in the Persian calendar. (Upload Media and Authentication Fixed🛠)
- #1 Pillow Library to generate images:
-
#2 Run Linux server to run Python script automatically:
More Information is in Linux-info.txt
-
#3 Twitter API (IMPORTANT):
V2/V1 -> Auth, Post:
- Just put your API/Consumer, access key, and secret in the main.py
- We need both v2 & v1 API to Authenticate.
V1 (limitation) -> Upload Media (Photo):
-
Media ID should be list type:
media = api.media_upload("PATH\image.jpg", chunked=True, media_category="tweet_image") media_ids = [media.media_id] -
Response and Post Tweet Post and manage tweet :
response = client.create_tweet( text = "text", media_ids = media_ids )
