瀏覽代碼

Ajouter 'twitter.py'

master
TheBidouilleur 8 月之前
父節點
當前提交
4a236f9522
共有 1 個檔案被更改,包括 24 行新增0 行删除
  1. +24
    -0
      twitter.py

+ 24
- 0
twitter.py 查看文件

@@ -0,0 +1,24 @@
from config import twitter
import tweepy
auth = tweepy.OAuthHandler(twitter['consumer_key'], twitter['consumer_secret'])



def tweet(message):
# authentication of access token and secret
auth.set_access_token(twitter['access_token'], twitter['access_token_secret'])
api = tweepy.API(auth)
# update the status
api.update_status(status = message)



def main():
print("Nothing to do here")




if __name__ == '__main__':
main()

Loading…
取消
儲存