使用谷歌API张 [英] using the google sheets api

查看:175
本文介绍了使用谷歌API张的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够从Android应用程序编辑谷歌小号preadsheet。

I want to be able to edit a google spreadsheet from a Android app.

我读,我需要做的OAuth 2.0,只有在那之后我可以访问API。

I read that I need to do the OAuth 2.0 and only after that I can access the API.

在在Android werbsite与谷歌在授权的REST API的,它说:

in the Authorizing with Google for REST APIs in the android werbsite, it says:

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.

我的问题是:
我应该使用什么为表API?

在谷歌Play服务库和GoogleApiClient?

the Google Play services library and GoogleApiClient?

或GoogleAuthUtil和页面上的例子吗?

or the GoogleAuthUtil and the example on the page?

它真的不清楚,我是什么做的床单API的OAuth 2.0的正确方法。

thnaks!

推荐答案

这是独立的 - 你得到的OAuth2访问和放大器;再新鲜的令牌,然后使用与谷歌-S preadsheet-API的访问令牌。

OAuth2 and Google-spreadsheet-API

These are independent -- You get the OAuth2 access & re-fresh tokens and then use the access token with the google-spreadsheet-api.

有关令牌的一个基本的了解看这个博客,并引用谷歌OAuth2.0的游乐场。
http://masashi-k.blogspot.jp/2013/06/sending-mail-with-gmail-using-xoauth2.html

For a basic understanding of the tokens see this blog and the references to "Google OAuth2.0 Playground." http://masashi-k.blogspot.jp/2013/06/sending-mail-with-gmail-using-xoauth2.html

我还没有试过,不过貌似我见过的最好的教程。
http://soatutorials.blogspot.co.at/2013/08/google-s$p$padsheet-api-connecting-with.html
来自:<一href=\"http://stackoverflow.com/questions/27572617/oauth2-authorization-from-java-scala-using-google-gdata-client-api\">OAuth2使用谷歌gdata的客户端API 从Java / Scala的授权

I have not tried this, but looks like the best tutorial I have seen. http://soatutorials.blogspot.co.at/2013/08/google-spreadsheet-api-connecting-with.html From: OAuth2 authorization from Java/Scala using google gdata client API

或谷歌DrEdit教程包含的OAuth2

OR the google DrEdit tutorial includes OAuth2

这篇关于使用谷歌API张的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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