我正在尝试使用带有流动代码和身份验证的Google云端硬盘服务
var auth = new OAuth2Authenticator (
clientId: xxxxxxxx
scope: "https://www.googleapis.com/auth/drive",
authorizeUrl: new Uri ("https://accounts.google.com/o/oauth2/auth"),
redirectUrl: new Uri ("myredirect:oob"));
并尝试按
初始化Google云端硬盘服务var service = new DriveService(new BaseClientService.Initializer()
{
HttpClientInitializer = auth,
ApplicationName = "Google Drive API Sample",
});
但上面的代码显示错误 错误CS0266:无法隐式转换类型' Xamarin.Auth.OAuth2Authenticator'到Google.Apis.Http.IConfigurableHttpClientInitializer'。存在显式转换(您是否缺少演员?)(CS0266)