I have written some basic Python code to try authenticate my credentials on twitter:
import twitter
api = twitter.Api(consumer_key='',
consumer_secret='',
access_token_key='',
access_token_secret='')
But I receive the following error message when doing so:
Traceback (most recent call last):
File "C:\Python33\nettest.py", line 3, in <module>
api = twitter.Api(consumer_key='',
AttributeError: 'module' object has no attribute 'Api'
Can anyone see what I am doing wrong? I have tried variations on this code but they all seem to fall down with the api part of the twitter 1.14.2 that i am using. i have installed this module via pip 3.3 to my python 3.3 directory. when i look in lib>site_packages>twitter i can see that there is a module installed called api. I'm really not sure what is going wrong as this should seemingly be a simple piece of code to run.
Any ideas?
sudo pip uninstall twitter sudo pip install python-twitter... and it works..If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With