浅谈Google Drive 推出了云端存储的web API配置

转载请注明原文出自:http://blog.csdn.net/lizhiliang06/article/details/8667073,里面有更多精彩文章

Google最近推出了云端存储的web API,并且提供了Demo,想做相关方面开发的程序猿有福了,

我们可以从google 提供的地址:https://developers.google.com/drive/examples/ 上下载何种语言的Demo source code,

里面也有每种demo的开发指导,

这里也讲解一下我的操作过程,还有得到的实际效果,

下面基本上用图来说明讲解,这样会简单明了,

(1)首先要有个Google账号

(2)Google API地址https://code.google.com/apis/console/#project:553547969563

(3)进入api选择services

(4)点击API Access,配置各项如下图


(5)进入Driver SDK配置如下图


(6).NETdemo配置代码

namespace  DrEdit.Models
{
     internal  static  class  ClientCredentials
    {
                     ///  <summary>
                     ///  The OAuth2.0 Client ID of your project.
                     ///  </summary>
         public  static  readonly  string  CLIENT_ID =  "xxxxxx.apps.googleusercontent.com"  ;  //"[[YOUR_CLIENT_ID]]";

                     ///  <summary>
                     ///  The OAuth2.0 Client secret of your project.
                     ///  </summary>
         public  static  readonly  string  CLIENT_SECRET =  "xxxxxx"  ;  //"[[YOUR_CLIENT_SECRET]]";

         ///  <summary>
         ///  The OAuth2.0 scopes required by your project.
         ///  </summary>
         public  static  readonly  string [] SCOPES =  new  String []
        {
             "https://www.googleapis.com/auth/drive.file"  ,
             "https://www.googleapis.com/auth/userinfo.email"  ,
             "https://www.googleapis.com/auth/userinfo.profile"  ,
             "https://www.googleapis.com/auth/drive.install"
        };

                     ///  <summary>
                     ///  The Redirect URI of your project.
                     ///  </summary>
         public  static  readonly  string  REDIRECT_URI =  "http://127.0.0.1"    //"[[YOUR_REDIRECT_URI]]";
    }
}
(7)得到的效果


到这里已经是运行demo成功了.

转载请注明原文出自:http://blog.csdn.net/lizhiliang06/article/details/8667073,里面有更多精彩文章

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值