1$ pip install tweepy
2-
3import tweepy
4
5auth = tweepy.OAuthHandler("YOU_CONSUMER_KEY", "YOUR_CONSUMER_SECRET")
6auth.set_access_token("YOUR_ACCESS_TOKEN", "YOUR_ACCESS_SECRET")
7api = tweepy.API(auth)
8
9# Tweet something
10tweet = api.update_status("My first tweet!")
11
12# Like the tweet you just made
13api.create_favorite(tweet.id)