Created
October 4, 2017 10:20
-
-
Save kurozumi/1ad7551ae1bf5c5341daaa23af1ba374 to your computer and use it in GitHub Desktop.
【Python】Amazon Dashボタンでツイッターにツイートする方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import tweepy | |
from datetime import datetime | |
CONSUMER_KEY = "CONSUMER_KEYを設定" | |
CONSUMER_SECRET = "CONSUMER_SECRETを設定" | |
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) | |
ACCESS_TOKEN = "ACCESS_TOKENを設定" | |
ACCESS_SECRET = "ACCESS_SECRETを設定" | |
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET) | |
api = tweepy.API(auth) | |
now = datetime.now().strftime("%Y年%m月%d日 %H時%M分%S秒") | |
api.update_status(status="{}にアマゾンダッシュボタンが押されました。".format(now)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment