Requirements
- Twitter API
- Twitter API SECRET
- Twitter ACCESS TOKEN
- Twitter ACCESS TOKEN SECRET
- Google Account
For instructions on how to obtain the Twitter API, please refer to the reference sites.
Steps to Tweet using API
- Access https://colab.research.google.com/
- Select “File” -> “New notebook”
- Paste and run the following code (use your own obtained values)
| |
- Paste and run the following code
| |
- Paste and run the following code (API v1.1)
| |
→ A tweet saying hello will be posted
- Paste and run the following code (API v2.0)
| |
→ A tweet saying hello v2 will be posted
That’s all
References
- [As of April 2021] Thorough Explanation of Twitter API Application Process with Example Use Cases and Screenshots
- [No Troublesome Setup Needed!] Google Colaboratory is Recommended for Trying Out Twitter API [Source Code is also Shared]
- [Tweepy] Twitter API v2: Tweet, Reply, Poll, Media (v1.1) [Python]
