2011-12-16 76 views
2

可以使用OAuth2 access_token訪問Google閱讀器訂閱嗎?我創建了Google API項目,設置了域並創建了接收OAuth2令牌的JavaScript代碼。它適用於其他Google API,但不適用於Google Reader OPML訂閱。任何人都可以暗示我嗎?使用OAuth2訪問Google閱讀器訂閱access_token

+0

http://stackoverflow.com/q/12724154/1244210 – wfwei 2012-10-04 09:54:01

回答

5

似乎我已經解決了我自己。訣竅是,在從瀏覽器獲取「代碼」令牌後,您應該調用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/ *如上所述。

+0

你好, 我想使用Google Oauth 2.0操場來訪問Google Reader API。我使用的是http://www.google.com/reader/api/範圍,但似乎不起作用。任何幫助將不勝感激。 謝謝。 – 2013-01-02 02:15:42