###前提・実現したいこと
Python2.7を使用してTwitterに投稿したい
連続して同じ文字を投稿できないのでできるようにしたい
※cronで毎時実行できるようにしたい。
###発生している問題・エラーメッセージ
Traceback (most recent call last):
File "tweetBalse.py", line 23, in <module>
api.update_status(comment)
File "build/bdist.linux-x86_64/egg/tweepy/api.py", line 194, in update_status
File "build/bdist.linux-x86_64/egg/tweepy/binder.py", line 245, in _call
File "build/bdist.linux-x86_64/egg/tweepy/binder.py", line 229, in execute
tweepy.error.TweepError: [{u'message': u'Status is a duplicate.', u'code': 187}]
###該当のソースコード
import tweepy
consumer_key = ""
consumer_secret = ""
access_token = ""
access_secret = ""
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = tweepy.API(auth)
api.update_status('test')
###補足情報
Python 2.7.5
CentOS Linux release 7.2.1511 (Core)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/25 01:51