Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://apps.twitter.com/
- Go into command line
- pip install --upgrade pip
- pip install tweepy
- create new python file
- python file
- -----------
- import tweepy
- consumer_key = ''
- consumer_secret = ''
- access_token = ''
- access_token_secret = ''
- #OAuth and integrate with API
- auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
- auth.set_access_token(access_token, access_token_secret)
- api = tweepy.API(auth)
- # Write a tweet to push to our Twitter account
- tweet = 'Hello, world!'
- api.update_status(status=tweet)
Advertisement
Add Comment
Please, Sign In to add comment