2012-03-06 4 views

答えて

0

私はあなたがサードパーティのライブラリを使用して罰金だと仮定すると、その最初の、インストールtweepyだ:

$ pip install tweepy 

ありothergreat TwitterのAPIラッパーがそこにいるが、私はtweepyからあなたを得ることができると思います最小限のコードを使用して状態を更新するOAuth認証ちょうど例hereに従ってください。私はあなたが、少なくとも自分で達成したものを示していた場合は、あなたの質問はそんなにdownvotedされていないだろうと思うし、具体的にどのような問題あなたがた

#!/usr/bin/env python 

# After registering your app you should be able to 
# find these values on your application page. 
# https://dev.twitter.com/apps/{your_app_id}/show 
# Make sure your app's access level is "Read and Write", 
# or you won't be able to post. 
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) 

api.update_status('Maybe you should try Googling next time!') 

:私はまた、以下のそれの要旨を掲載しました向いている。

関連する問題