1.
http://dev.twitter.com/apps/new 页面的 Callback URL 填写的是
http://aaaaaaa.appspot.com/settings 不知道对不对。
2.申请到 Twitter 网站上的 OAuth Consumer Key 和 Secret 了。
也写入
config.py 了,不知道是不是这样:
if os.environ['SERVER_SOFTWARE'] == 'Development/1.0':
twitter_consumer_key = 'aaaaaaaMUWXfQtdpw'
twitter_consumer_secret = 'aaaaaaaIRMuAzk5oBplLndTzszbcJPLVZs'
else:
twitter_consumer_key = 'aaaaaaaIJMUWXfQtdpw'
twitter_consumer_secret = 'aaaaaaaYZuIRMuAzk5oBplLndTzszbcJPLVZs'
3.在绑定账户时,前几天是点击后,twitter 的界面出现,工作一会后,返回原地,但小鸟没有出现。
刚才在
config.py 胡乱改了一下,也恢复原样了,但总出现下面的错误,不知道怎么回事。
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 511, in __call__
handler.get(*groups)
File "/base/data/home/apps/chinango20/1.344933628934134655/
t.py", line 49, in get
request_token = twitter.getRequestToken()
File "/base/data/home/apps/chinango20/1.344933628934134655/twitter/
oauthtwitter.py", line 189, in getRequestToken
resp = self._FetchUrl(url, no_cache=True)
File "/base/data/home/apps/chinango20/1.344933628934134655/twitter/
oauthtwitter.py", line 101, 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
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/2760
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.