使用 OAuth2 access_token 访问 Google Reader 订阅
是否可以使用 OAuth2 access_token 访问 Google Reader 订阅?我已经创建了 Google API 项目,设置了域并创建了接收 OAuth2 令牌的 javascript 代码。它适用于其他 Google API,但不适用于 Google Reader OPML 订阅。有人可以提示我吗?
Is that possible to access Google Reader subscriptions using OAuth2 access_token? I've created Google APIs project, setting up domain and created javascript code that receives OAuth2 token. It works well for other Google APIs, but not for Google Reader OPML subscriptions. Could anyone hint me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来我自己解决了。诀窍是,从浏览器获取“code”令牌后,您应该执行对 https://accounts 的调用.google.com/o/oauth2/token获取access_token、token_type、expires_in和refresh_token。
另一件重要的事情是,您应该将范围定义为 http://www.google.com/reader/api 不是 http://www.google.com/reader/api/* 如所述某处。
Seems I've solved myself. The trick was that after obtaining "code" token from browser, you should perform call to https://accounts.google.com/o/oauth2/token to obtain access_token, token_type, expires_in and refresh_token.
Another important thing is that you should define scope as http://www.google.com/reader/api not http://www.google.com/reader/api/* as stated somewhere.