如果我的用戶未使用Google帳戶用戶api登錄到我的應用程序,則在升級我的會話令牌時遇到問題。如果用戶當前登錄,那麼它的功能完美。無法登錄Google帳戶用戶API無法升級YouTube會話令牌
如果沒有,那麼我得到這個錯誤:
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/5th-anniversary/1.341853888797531127/main.py", line 78, in get
u.upgradeToken(self)
File "/base/data/home/apps/5th-anniversary/1.341853888797531127/upload.py", line 47, in upgradeToken
client.UpgradeToSessionToken()
File "/base/data/home/apps/5th-anniversary/1.341853888797531127/gdata/service.py", line 903, in UpgradeToSessionToken
raise NonAuthSubToken
NonAuthSubToken
什麼是我的最佳選擇嗎?我不希望用戶必須登錄到Google帳戶API,然後才能上傳YouTube視頻。
這裏是我的更新標記方法:
def upgradeToken(data,self):
get = self.request.GET
authsub_token = get['token']
gdata.alt.appengine.run_on_appengine(client)
client.SetAuthSubToken(authsub_token)
client.UpgradeToSessionToken()
客戶端僅僅是client = gdata.youtube.service.YouTubeService()
很肯定我的思念在認證方面的東西,但我似乎無法看到了什麼,謝謝!