使用 OAuth2 access_token 访问 Google 阅读器订阅 [英] Accessing Google Reader subscriptions with OAuth2 access_token

查看:29
本文介绍了使用 OAuth2 access_token 访问 Google 阅读器订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 OAuth2 access_token 访问 Google 阅读器订阅?我创建了 Google APIs 项目,设置了域并创建了接收 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?

推荐答案

看来我已经自己解决了.诀窍是从浏览器获取代码"令牌后,您应该调用 https://accounts.google.com/o/oauth2/token 获取 access_token、token_type、expires_in 和 refresh_token.

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.

另一件重要的事情是你应该将范围定义为 http://www.google.com/reader/api 不是 http://www.google.com/reader/api/* 如某处所述.

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.

这篇关于使用 OAuth2 access_token 访问 Google 阅读器订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆