jackybowen / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

auth failure - all API doesn't work #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
twitter doesn't support basic authentication any more, see here
http://dev.twitter.com/pages/auth

however, as far as I can see in twitter.py it uses simple authentication.
as a result - all the lib is non-functional!

here's the exception:
...
  File "/usr/lib/pymodules/python2.6/twitter.py", line 1371, in GetFriendsTimeline
    json = self._FetchUrl(url, parameters=parameters)
  File "/usr/lib/pymodules/python2.6/twitter.py", line 2033, in _FetchUrl
    url_data = opener.open(url, encoded_post_data).read()
  File "/usr/lib/python2.6/urllib2.py", line 395, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/urllib2.py", line 508, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 427, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 853, in http_error_401
    url, req, headers)
  File "/usr/lib/python2.6/urllib2.py", line 831, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/usr/lib/python2.6/urllib2.py", line 841, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/usr/lib/python2.6/urllib2.py", line 395, in open
    response = meth(req, response)
  File "/usr/lib/python2.6/urllib2.py", line 508, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.6/urllib2.py", line 433, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 516, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized

Original issue reported on code.google.com by atar.shi...@gmail.com on 1 Sep 2010 at 3:28

GoogleCodeExporter commented 9 years ago
investigating further is see:
curl -u <username>:<password> 
"http://twitter.com/statuses/friends_timeline/<account>.json"
I get:
{"request":"/statuses/friends_timeline/botHadashot.json","error":"Basic 
authentication has been disabled"}

Original comment by atar.shi...@gmail.com on 1 Sep 2010 at 3:33

GoogleCodeExporter commented 9 years ago
Yes, oAuth support has been added to the trunk and i'm working on finishing the 
steps needed to release it.

See Issue 65 for all the oAuth messy details.

Original comment by bear42 on 1 Sep 2010 at 3:43