Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from requests_oauthlib import OAuth1
- url = 'https://api.twitter.com/1.1/statuses/update.json'
- app_key = ''
- app_secret = ''
- token = ''
- token_secret = ''
- auth = OAuth1(app_key, app_secret, token, token_secret)
- data = {'status':'Tweet text goes here'}
- r = requests.post(url, data, auth = auth)
- print(r.json())
Advertisement
Add Comment
Please, Sign In to add comment