twitter-1.9.0(http://pypi.python.org/pypi/twitter/1.9.0)を使用してステータスメッセージを送信しようとしていますが、送信できません。以下はコードスニペットです。
import twitter as t
# consumer and authentication key values are provided here.
def tweet(status):
if len(status) > 140 :
raise Exception ('Status message too long !!!')
authkey = t.Twitter(auth=t.OAuth(ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET, CONSUMER_KEY, CONSUMER_SECRET))
authkey.statuses.update(status)
....
price = 99.99
status = "buy price is $" + str(price)
tweet(status)
エラーは次のようになります。
Traceback (most recent call last):
File "/home/tanmaya/Documents/prog/py_prog/progs/getprice.py", line 42, in <module>
tweet(status)
File "/home/tanmaya/Documents/prog/py_prog/progs/getprice.py", line 17, in tweet
authkey.statuses.update(status)
TypeError: __call__() takes 1 positional argument but 2 were given
行番号は異なる場合があります。私はこれらのWebモジュールとPythonのプログラムに少し慣れていません。助けてください !!
注意:私はpython 3.3を使用しているので、python3.3パッケージページからこれだけ(twitter-1.9.0)を入手しました。私の完全なプログラムは少し長いので、他のバージョンのpythonに移行したくありません。