Any suggestions for a good Twitter library (preferably in Ruby or Python)? I have a list of usernames, and I need to be able to programmatically follow these users.
I tried twitter4r in Ruby, but user search does not work. When i do
twitter = Twitter::Client.new(:login => 'mylogin', :password => 'mypassword')
user = Twitter::User.find('ev', twitter)
... The user always returned to a specific guy named "Jose Italo", no matter what username I am trying to make.
Similary, I tried python-twitter, but the following users do not seem to work. When i do
api = twitter.Api(username='mylogin', password='mypassword')
user = api.GetUser('ev')
api.CreateFriendship(user)
... I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.5-i386/egg/twitter.py", line 1769, in CreateFriendship
File "build/bdist.macosx-10.5-i386/egg/simplejson/__init__.py", line 307, in loads
File "build/bdist.macosx-10.5-i386/egg/simplejson/decoder.py", line 335, in decode
File "build/bdist.macosx-10.5-i386/egg/simplejson/decoder.py", line 353, in raw_decode
ValueError: No JSON object could be decoded
So, any suggestions for a working library or how to make twitter4r or python twitter work?
Ruld
source
share