Python中文
首页
教程
问答
标签
搜索
登录
注册
使用tornado和TwitterMixin缺少OAuth请求令牌cookie错误
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我使用的是tornado和TwitterMixin,我使用以下基本代码:</p> <pre><code>class OauthTwitterHandler(BaseHandler, tornado.auth.TwitterMixin): @tornado.web.asynchronous def get(self): if self.get_argument("oauth_token", None): self.get_authenticated_user(self.async_callback(self._on_auth)) return self.authorize_redirect() def _on_auth(self, user): if not user: raise tornado.web.HTTPError(500, "Twitter auth failed") self.write(user) self.finish() </code></pre> <p>对我来说,它工作得很好,但有时,我的应用程序的用户会收到一个500错误,上面说: 缺少OAuth请求令牌cookie</p> <p>我不知道它是来自浏览器还是来自twitter的api回调配置。 我看过龙卷风代码,不明白为什么会出现这个错误 出现。在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>我找到了解决办法!!在</p> <p>这是因为我的域名系统。在</p> <p>我没有把重定向www.mydomain.com网站以及我的域名所以有时候cookie是在www上设置的,有时候不是这样,我的服务器没有检查好位置,没有找到cookie,然后给我发送了500个错误。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
在python3中使用Scipy pearsonr函数
7 回答
在Python3中使用scipy对多个lorentzian进行数据拟合
10 回答
在Python3中使用Script=argv
6 回答
在python3中使用selenium webdriver进行未解析的回溯
6 回答
在python3中使用selenium和phantomjs的网页截图之前如何等待?
6 回答
在Python3中使用Selenium和Requests模块从网页获取文件
5 回答
在python3中使用SIGINT终止函数
2 回答
在Python3中使用SIGTERM时,允许进程完成而不是中断
7 回答
在python3中使用smtplib发送XML内容
4 回答
在python3中使用socket库(RFCOMM模式)重新连接蓝牙设备?
2 回答
在python3中使用sounddevice和numpy编写wav文件
4 回答
在python3中使用Sqlalchemy插入MySQL查找类型错误的原因
1 回答
在python3中使用sqlite、pandas和sqlalchemy很难让rollback工作
10 回答
在python3中使用SQLite的FTS3/4
2 回答
在Python3中使用struct.calcsize()和len()有区别吗?
10 回答
在python3中使用substring函数时发生TypeError
3 回答
在Python3中使用Tkinter entry小部件写入串行设备
10 回答
在python3中使用tkinter时,如何在每次按下函数时获得运行该函数的按钮?
9 回答
在python3中使用tkinter的子帧
8 回答
在Python3中使用tryexcept块时,如何避免使用未初始化的变量?
3 回答