Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 403客户端错误:url禁止:https://api.twitter.com/oauth/request_token -无法使用Twitter登录_Python_Django_Twitter Oauth - Fatal编程技术网

Python 403客户端错误:url禁止:https://api.twitter.com/oauth/request_token -无法使用Twitter登录

Python 403客户端错误:url禁止:https://api.twitter.com/oauth/request_token -无法使用Twitter登录,python,django,twitter-oauth,Python,Django,Twitter Oauth,我试图将twitter登录选项添加到python应用程序中,但从web服务器收到以下错误: GET/social auth/login/twitter/HTTP/1.1 500 103190 403客户端错误:url禁止: 我在本地主机上使用SSL开发环境django+unicorn。我查看了Twitter回调url指南中的以下说明: 不要将localhost用作回调URL而不是使用localhost,请在本地或本地使用自定义主机https://127.0.0.1. 我的回拨URL: 是否可以在

我试图将twitter登录选项添加到python应用程序中,但从web服务器收到以下错误:

GET/social auth/login/twitter/HTTP/1.1 500 103190 403客户端错误:url禁止:

我在本地主机上使用SSL开发环境django+unicorn。我查看了Twitter回调url指南中的以下说明:

不要将localhost用作回调URL而不是使用localhost,请在本地或本地使用自定义主机https://127.0.0.1.

我的回拨URL:


是否可以在不托管real domain的情况下使其工作?

是的,您可以在开发服务器上测试API

试试这个:

https://localhost:8000/complete/twitter/
                 or 
https://127.0.0.1:8000/complete/twitter/
在您的应用程序中更新您的回调URL

请参阅本文以了解更多信息:


他们直截了当地说,use不使用localhost,甚至使用,这就足够了。如果你有代码或其他东西,请提供。请提供代码