我在Android上使用Google Play服務訪問Google Apis和Google雲端點。我也可以使用Google Play服務中的令牌訪問appengine User API。這可能嗎?有關OAuth的link有一些示例代碼,但有點含糊。我可以通過標題中的oauth標記並獲取下面代碼的用戶?Oauth在Appengine上使用Google Play服務
User user = null;
try {
OAuthService oauth = OAuthServiceFactory.getOAuthService();
user = oauth.getCurrentUser();
} catch (OAuthRequestException e) {
// The consumer made an invalid OAuth request, used an access token that was
// revoked, or did not provide OAuth information.
// ...
}
感謝您的回覆,它幫助我清除了一些東西。我絕對使用GS +端點方法。 – Patrick
Hi @Dan,我在服務器端用sprint Oauth2身份驗證GS +端點,我得到「完全授權是必需的」。你有什麼想法嗎? –