C# 谷歌验证器工厂更换?

C# 谷歌验证器工厂更换?,c#,oauth-2.0,google-calendar-api,C#,Oauth 2.0,Google Calendar Api,Google日历API的“第一个应用”教程在使用Google验证应用程序时使用AuthenticatorFactory。据报道,AuthenticatorFactory于2011年8月8日从API中删除。有人能告诉我如何找到一种“新”的方式来通过谷歌认证我的应用程序吗 编辑:刚刚意识到我没有包括我正在使用的语言-我正在寻找如何验证/授权已安装的C#应用程序的示例。很抱歉打开了一个旧主题,但我遇到了相同的问题,我花了很长时间才找到解决方案。所以对于所有有同样问题的人: AuthenticatorF

Google日历API的“第一个应用”教程在使用Google验证应用程序时使用AuthenticatorFactory。据报道,AuthenticatorFactory于2011年8月8日从API中删除。有人能告诉我如何找到一种“新”的方式来通过谷歌认证我的应用程序吗


编辑:刚刚意识到我没有包括我正在使用的语言-我正在寻找如何验证/授权已安装的C#应用程序的示例。

很抱歉打开了一个旧主题,但我遇到了相同的问题,我花了很长时间才找到解决方案。所以对于所有有同样问题的人:

AuthenticatorFactory无法工作,您需要使用以下代码创建服务:

var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthentication);

// Create the service.
var service = new CalendarService(new BaseClientService.Initializer
{
     Authenticator = auth
});
var auth=新的OAuth2Authenticator(提供者,GetAuthentication);
//创建服务。
var service=new CalendarService(new BaseClientService.Initializer
{
验证器=auth
});
祝你好运