2013-09-02 8 views
8

私は、過去3時間の成功を収めずに検索するためにtweepyを取得しようとしてきました。私はそれがAPI 1.1を使用すべきであると答えている。私はそれが実現したと思った...私はtweepyで投稿できるので。私は間違って何をしていますか? githubのから直接インストール、Tweepyを使ってAPI 1.1のつぶやきを検索する

pip install --upgrade tweepy 

または::

#!/usr/bin/env python 

import tweepy 

consumer_key = '***' 
consumer_secret = '***' 
access_token = '***' 
access_token_secret = '***' 

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

api = tweepy.API(auth) 


results = api.search(q="Mice") 

for result in results: 
    print result.text 
+0

あなたが何か間違っていないことを示しているか、あなたが望むものではないことを示すエラー/出力を投稿できますか? –

答えて

6
はあなたの tweepyバージョンをアップグレードし

git clone https://github.com/tweepy/tweepy.git 
cd tweepy 
python setup.py install 

はFYI、2.1バージョンを使用してコードをテストした - それは動作します。

+0

それが問題を解決しました。どうもありがとう。 – user2740993

関連する問題