I have installed Python 2.7 and trying to use Twitter package. I have installed the 3 pre-requisite packages successfully... I have got the consumer keys and access tokens...But somehow getting this error:
>>> import twitter
>>> api = twitter.Api(consumer_key='consumer_key',
consumer_secret='consumer_secret',
access_token_key='access_token',
access_token_secret='access_token_secret')
>>> print api.VerifyCredentials()
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
print api.VerifyCredentials()
File "build\bdist.win32\egg\twitter.py", line 4257, in VerifyCredentials
json = self._FetchUrl(url, no_cache=True)
File "build\bdist.win32\egg\twitter.py", line 4611, in _FetchUrl
response = opener.open(url, encoded_post_data)
File "C:\Python\Python27\lib\urllib2.py", line 404, in open
response = self._open(req, data)
File "C:\Python\Python27\lib\urllib2.py", line 422, in _open
'_open', req)
File "C:\Python\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\Python\Python27\lib\urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "C:\Python\Python27\lib\urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
All the other commands are also resulting in the same error... e.g.
statuses = api.GetUserTimeline(user)
Any help would be appreciated...