Jun 062011
 

Install tweepy via PyPI:

easy_install tweepy

Example usage with identi.ca:

import tweepy
username, password = "identi.ca_username", "identi.ca_password"
auth = tweepy.BasicAuthHandler(username, password)
api = tweepy.API(auth, host = 'identi.ca', api_root = '/api', secure = True)
api.verify_credentials()
if not api.verify_credentials():
    print 'Unable to log in Identica!'
    import sys; sys.exit(1)
else:
    print 'Correctly logged in Identica!'
api.update_status('Updating using basic authentication via Tweepy!')

Resources

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)