如何使用OAuth2.0访问Google Feed(Reader)?

时间:2012-10-04 09:23:34

标签: java oauth-2.0 google-authentication google-feed-api

我想使用OAuth2.0访问Google Feed。我使用google-oauth-java-client来获取访问令牌。如何使用它来访问Feed API?

我引用了dailymotion-cmdline-sample,并将SCOPE更改为http://www.google.com/reader/api以获取凭据。

它返回:

401 Unauthorized

You must be signed in to access this stream.

我不知道出了什么问题......

我还阅读了一些帖子,其中显示OAuth2.0可以完成这项工作,但它们对我来说不够详细:

Read access only for the Google OAuth 2.0 token?

Using the Google Reader API

Accessing Google Reader subscriptions with OAuth2 access_token

1 个答案:

答案 0 :(得分:6)

我的范围与http://www.google.com/reader/api/*有同样的问题。 我通过将范围更改为http://www.google.com/reader/api/来解决它。 最后尝试使用/