相关疑难解决方法(0)

通过Google API获取用户信息

是否可以通过Google API从用户的个人资料中获取信息?如果可能,我应该使用哪个API?

我对这些信息感兴趣:

从用户的个人资料中获取其他信息也很酷.

oauth google-api userinfo

92
推荐指数
6
解决办法
19万
查看次数

C#桌面应用程序.如何将文件上传到Google云端硬盘的简单示例

是否有任何桌面应用程序的代码示例如何授权Google Drive服务并上传文件?

目前我有:

var parameters = new OAuth2Parameters
                                 {
                                     ClientId = ClientCredentials.ClientId,
                                     ClientSecret = ClientCredentials.ClientSecret,
                                     RedirectUri = ClientCredentials.RedirectUris[0],
                                     Scope = ClientCredentials.GetScopes()
                                 };    
string url = OAuthUtil.CreateOAuth2AuthorizationUrl(parameters);
    // Open url, click to allow and copy secret code
    parameters.AccessCode = secretCodeFromBrowser;
    OAuthUtil.GetAccessToken(parameters);
    string accessToken = parameters.AccessToken;
    // So, there is the access token
Run Code Online (Sandbox Code Playgroud)

但接下来的步骤是什么?正如我从示例中看到的,我应该获得IAuthenticator实例并将其传递给DriveService类的构造函数...如何获取IAuthenticator的实例?如果我的上述代码是正确的...提前谢谢.

c# google-drive-api

11
推荐指数
1
解决办法
4万
查看次数

标签 统计

c# ×1

google-api ×1

google-drive-api ×1

oauth ×1

userinfo ×1