Advertisement
NubeColectiva

enviarTweet.py

Jul 28th, 2022 (edited)
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. # import the tweepy library
  2. import tweepy
  3.  
  4. import config
  5.  
  6. cliente = tweepy.Client(
  7.     consumer_key=config.CONSUMER_KEY,
  8.     consumer_secret=config.CONSUMER_SECRET,
  9.     access_token=config.ACCESS_TOKEN,
  10.     access_token_secret=config.ACCESS_TOKEN_SECRET)
  11.  
  12. # create a variable called texto_tweet with a string that says "Este Tweet Fue Creado Con GitHub Copilot"
  13. texto_tweet = "Este Tweet Fue Creado Con GitHub Copilot"
  14.  
  15. # send tweet with client.create_tweet method and text as argument. Save the result in a variable called response
  16. response = cliente.create_tweet(text=texto_tweet)
  17.  
  18. print(response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement