我正在尝试在Google App Engine中为我的学校报纸完成一个故事分配系统.它将追踪作家的截止日期,允许作家收集故事,并对周故事进行"一目了然"的观察.我和我的合作伙伴正试图将它与我们的报纸Google Apps安装完全整合.哦,我们必须使用3条腿的Oauth,因为我们没有Google Apps Premier.
在那次努力中,我偶然发现了Aeoid并且能够按照说明进行联合登录工作.这很酷!
我遇到麻烦的地方是使用Oauth获取用户谷歌文档的列表.我在这里设置了一个测试页面:mustrun.cornellsun.com/test.它给了我错误 - 我已将它们复制到这封邮件的底部.我不知道这是否与我的消费者秘密有关(我应该使用从谷歌市场获得的密钥?还是应该使用我从管理域页面获得的密钥?).现在我正在使用我从管理域页面获得的密钥
同样复杂的是,实际的appspot域是mustrun2sun [] .appspot [太新了不能发布多个链接] .com,但我在google应用程序中设置它,以便只有来自我的域的用户才能登录以便应用程序部署在我的域上.(app部署为must[]run[].corn[]ellsun[].[]com&,即使在管理域中,所有内容都指向它.)
我正在使用GDClient 2.0类,所以我很确定一切都应该按计划运行...即我没有使用旧的服务或任何东西.我已经用作htt[]p:/[]/k[]ing[]yo-bachi.blog[]spot.c[]om/2010/05/gaego[]ogleoauth.ht[]ml我的Oauth"舞蹈"的一个模板,因为谷歌的例子已经过时并且使用旧的Google数据1.0库 - 我想.
我进入测试页面时遇到的错误是
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/mustrun2sun/1.341947133742569880/main.py", line 170, in get
feed = client.GetDocList(auth_token=gdata.gauth.AeLoad(users.get_current_user().user_id())) #auth_token=TOKEN
File "/base/data/home/apps/mustrun2sun/1.341947133742569880/gdata/docs/client.py", line 141, in get_doclist
auth_token=auth_token, **kwargs)
File "/base/data/home/apps/mustrun2sun/1.341947133742569880/gdata/client.py", line 635, in get_feed
**kwargs)
File "/base/data/home/apps/mustrun2sun/1.341947133742569880/gdata/client.py", line 308, in request
response, Unauthorized)
Unauthorized: Unauthorized - Server responded with: 401, <HTML>
<HEAD>
<TITLE>Token invalid …Run Code Online (Sandbox Code Playgroud)