我希望能够从 Android 应用程序编辑 Google 电子表格。
我读到我需要执行 OAuth 2.0,只有之后我才能访问 API。
在 android 网站的 Google 授权 REST API 中,它说:
Note: An OAuth 2.0 token using GoogleAuthUtil is required only for certain types of Google APIs that
you need to access over HTTP. If you're instead using the Google Play services library to access
Google APIs such as Google+ or Play Games, you don't need an OAuth 2.0 token and you can instead
access these services using the GoogleApiClient. For more information, read Accessing Google Play
Services APIs.
我的问题是:我应该使用 Sheets API 做什么?
Google Play 服务库和 GoogleApiClient?
或 GoogleAuthUtil 和页面上的示例?
我真的不清楚为工作表 API 执行 OAuth 2.0 的正确方法是什么。
thnaks!
OAuth2 和 Google 电子表格 API
它们是独立的——您获得 OAuth2 访问和刷新令牌,然后将访问令牌与 google-spreadsheet-api 一起使用。
了解 OAuth 令牌
有关令牌的基本了解,请参阅此博客和对“Google OAuth2.0 Playground”的引用。http://masashi-k.blogspot.jp/2013/06/sending-mail-with-gmail-using-xoauth2.html http://masashi-k.blogspot.jp/2013/06/sending-mail-with-gmail-using-xoauth2.html
OAuth2 和 Java
我没有尝试过这个,但看起来是我见过的最好的教程。http://soatutorials.blogspot.co.at/2013/08/google-spreadsheet-api-connecting-with.html http://soatutorials.blogspot.co.at/2013/08/google-spreadsheet-api-connecting-with.html
From: 使用 google gdata 客户端 API 从 Java/Scala 进行 OAuth2 授权 https://stackoverflow.com/questions/27572617/oauth2-authorization-from-java-scala-using-google-gdata-client-api
或者 google DrEdit 教程包含 OAuth2
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)