1

有人可以帮忙吗?提前致谢。

我使用 nonce、callback_url、consumer_key 等向 Twitter 发送请求。Twitter 然后提示用户输入登录名和密码。用户成功输入登录凭据。之后,Twitter 将 oauth_token 和 oauth_verifier 发送到之前调用中指定的回调 URl。但现在我总是收到“HTTP Error 401: Unauthorized”错误。有人可以帮忙吗?花了几天时间。谢谢你。

“获取 /account/twitter/oauthacc?oauth_token=ererererer&oauth_verifier=ereret43rwererererer”

HTTP Error 401: Unauthorized
    Traceback (most recent call last):
      File 
 "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 714, in __call__handler.get(*groups)
  File "/base/data/home/apps/s~test/2-7.3629731/oauth.py", line 74, in get
    self.mOauthRequestToken = vOauthApi.getRequestToken(self.ACCESS_TOKEN_URL)
  File "/base/data/home/apps/s~-test/2-7.369731/libs/oauthtwitter.py", line 206, in getRequestToken
    resp = self._FetchUrl(url, no_cache=True)
  File "/base/data/home/apps/s~test/2-7.3639731/libs/oauthtwitter.py", line 118, in _FetchUrl
    url_data = opener.open(url).read()
  File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized
4

0 回答 0