Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
25 lines (18 loc) · 565 Bytes

File metadata and controls

executable file
·
25 lines (18 loc) · 565 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import tweepy
# Authentication credentials - dev.twitter.com
cfg = {
'consumer_key': 'VALUE',
'consumer_secret': 'VALUE',
'access_token': 'VALUE',
'access_token_secret': 'VALUE'
}
def get_api_handler(cfg):
auth = tweepy.OAuthHandler(cfg['consumer_key'], cfg['consumer_secret'])
auth.set_access_token(cfg['access_token'], cfg['access_token_secret'])
return tweepy.API(auth)
def main():
api = get_api_handler(cfg)
tweet = 'Hello, world from Tweepy!'
api.update_status(status=tweet)
if __name__ == "__main__":
main()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.