0

Tweepy を使い始めたばかりで、インストールしました。私はそれで基本的な oauth を行ったので、すべてがうまくいっていることを知っています。

私が抱えている問題は、多くの人が指摘しているこの StreamWatcher の例を使用していることです。

https://github.com/tweepy/examples/blob/master/streamwatcher.py

実行すると、ユーザー名とパスワードの入力を求められ、その後すぐに次のエラーでクラッシュします。

TypeError: __init__() takes exactly 3 arguments (4 given)

私は立ち往生しています...

4

1 に答える 1

3

これを試して:

# page located at https://dev.twitter.com/apps (under "OAuth settings")
consumer_key="xxx"
consumer_secret="xxx"

access_token="xxx"
access_token_secret="xxx"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

...

stream = tweepy.Stream(auth, StreamWatcherListener(), timeout=None)
于 2012-03-09T03:27:12.403 に答える