Google 캘린더 V2에서 V3 Beta로 마이 asp.net 응용 프로그램을 마이 그 레이션했지만 이제는 1.8.1.820 버전의 새 DLL을 릴리스했습니다. 이런 점에서 나를 도우십시오. 나는 어떻게 개종 할 수 있습니까? 내 V3 베타 버전에 나는 그들이 NativeApplicationClient 클래스와 그들이 가지고 있지 않은 많은 기능이없는이 새로운 버전에서와 마찬가지로 코드Google 캘린더 v3 베타 버전에서 v3 1.8.1.820으로 마이그레이션
private CalendarService CreateService(string token)
{
KeyValuePair<string, string> credentials = Common.Get3LOCredentials();
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
provider.ClientIdentifier = credentials.Key;
provider.ClientSecret = credentials.Value;
var auth = new Google.Apis.Authentication.OAuth2.OAuth2Authenticator<NativeApplicationClient>(provider, (p) => GetAuthorization(provider, token, credentials.Key, credentials.Value));
CalendarService service = new CalendarService(new BaseClientService.Initializer()
{
Authenticator = auth,
ApiKey = ConfigurationManager.AppSettings["APIkey"].ToString(),
GZipEnabled = false
});
provider = null;
return service;
}
이하로 사용되었다. 따라서 Google에서 ASP.NET 개발자를위한 훌륭한 설명서를 제공하지 않았으므로 문서가 있으면 제게 제공하십시오.
private CalendarService CreateService(string token)
{
GoogleAuthorizationCodeFlow flow = null;
var assembly = Assembly.GetExecutingAssembly();
KeyValuePair<string, string> credentials = Common.Get3LOCredentials();
UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = credentials.Key, ClientSecret = credentials.Value }, new[] { "https://www.googleapis.com/auth/calendar" }, "user", CancellationToken.None, new FileDataStore("Calendar.Sample.Store")).Result;
var service = new CalendarService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "Calendar API Sample",
});
return service;
}
각 릴리스의 마지막 변경 내용이 얼마나 중대하게 변경되었는지는 모르겠습니까? Go Google! – Craig