我使用python-social-auth在本地實現twitter登錄,但我得到401客戶端錯誤。我的django版本是1.6。微博登錄:401客戶端錯誤:需要授權
Traceback:
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Library/Python/2.7/site-packages/social/apps/django_app/utils.py" in wrapper
45. return func(request, backend, *args, **kwargs)
File "/Library/Python/2.7/site-packages/social/apps/django_app/views.py" in auth
12. return do_auth(request.social_strategy, redirect_name=REDIRECT_FIELD_NAME)
File "/Library/Python/2.7/site-packages/social/actions.py" in do_auth
25. return strategy.start()
File "/Library/Python/2.7/site-packages/social/strategies/base.py" in start
66. return self.redirect(self.backend.auth_url())
File "/Library/Python/2.7/site-packages/social/backends/oauth.py" in auth_url
99. token = self.set_unauthorized_token()
File "/Library/Python/2.7/site-packages/social/backends/oauth.py" in set_unauthorized_token
158. token = self.unauthorized_token()
File "/Library/Python/2.7/site-packages/social/backends/oauth.py" in unauthorized_token
177. method=self.REQUEST_TOKEN_METHOD)
File "/Library/Python/2.7/site-packages/social/backends/base.py" in request
205. response.raise_for_status()
File "/Library/Python/2.7/site-packages/requests/models.py" in raise_for_status
808. raise HTTPError(http_error_msg, response=self)
Exception Type: HTTPError at /login/twitter/
Exception Value: 401 Client Error: Authorization Required
在documentation它建議安裝ntp.I不知道如何安裝NTP。
B,我也有同樣的問題。但是,我把上面的URL'http://127.0.0.1:8000/complete/twitter'也不起作用。獲得同樣的錯誤。可以請你幫我!預先致謝 – Mulagala 2014-10-17 06:24:12