SHARE
TWEET

Untitled

a guest Jun 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import tweepy
  2. import datetime
  3. ckey = 'xA9chfPK3sgQyCwMXPWMuf3kN'
  4. csecret ='YKxl4GKKrlsq0cOugrKQny14PreC8xLo0baX0kpgf8C6cABWDX'
  5. akey ='319032353-cv3RvSf6uGSWpUhypC7qgbl9uGuWYzDEojW08fD9'
  6. asecret ='ABi9lJ6xeHJGXQoNZMdDCErb8MmkfiwQWFxoNx9EquSMI'
  7.  
  8. auth = tweepy.OAuthHandler(ckey,csecret)
  9. auth.set_access_token(akey,asecret)
  10. api =tweepy.API(auth)
  11.  
  12. user = api.me()
  13. print(user.name)
  14. print(user.location)
  15.  
  16.  
  17. #ink = input("Masukan Tweet")
  18. #api.update_status(ink)
  19. def posting_tamu():
  20.     date = datetime.datetime.now()
  21.     reg_format_date = date.strftime("%d-%m-%Y %I:%M:%S %p")
  22.     api.update_with_media('my-image.png',"Tamu yang tidak dikenal, " + str(reg_format_date))
  23.  
  24. def posting_owner(owner):
  25.     date = datetime.datetime.now()
  26.     reg_format_date = date.strftime("%d-%m-%Y %I:%M:%S %p")
  27.     api.update_with_media('my-image.png',"selamat datang ",owner + str(reg_format_date))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top