twitter api python code example
Example 1: twitter api python
$ pip install tweepy
-
import tweepy
auth = tweepy.OAuthHandler("YOU_CONSUMER_KEY", "YOUR_CONSUMER_SECRET")
auth.set_access_token("YOUR_ACCESS_TOKEN", "YOUR_ACCESS_SECRET")
api = tweepy.API(auth)
tweet = api.update_status("My first tweet!")
api.create_favorite(tweet.id)
Example 2: twitter bot python
Check this link out:
https://realpython.com/twitter-bot-python-tweepy/
Example 3: twitter api python
pip install python-twitter
Example 4: twitter api tutorial python
pip install python-twitter