2014-10-14 1 views
0

URL - https://developers.google.com/google-apps/calendar/구글 캘린더 THR VBA는 알아낼 이벤트를 찾을 수 없습니다 오류

내가 Microsfot 인터넷 전송 제어를 사용하고 내가 대신 이벤트 ID를 사용하여 구글 캘린더에서 이벤트를 삭제 요청 를 보내려고하고있다 entryID의.

내가 사용한 코드,

strURL = "https://www.google.com/accounts/ClientLogin" 
strFormData = "Email=" & myEmail & "&Passwd=" & myPassword & "&source=" & mySource & 
"&service=cl" 
strHeaders = "Content-Type:application/x-www-form-urlencoded" 
Inet1.Execute strURL, "POST", strFormData, strHeaders 

'Wait for the server response must include the authentication mode 
Responded = False 
Do Until Responded = True 
    DoEvents 
Loop 

'Ensure that the password is correct for Google 
If InStr(response, "BadAuthentication") Then 'If the password is not Correct 
    MsgBox "Google has rejected the password. Confirm the e-mail and password and try 
    again.", vbCritical, "Error" 
    Exit Sub 
End If 

'Delete Event 
AuthCode = Right(response, Len(response) - InStrRev(response, "Auth=") - 4) 
strURL = "https://www.google.com/calendar/feeds/default/private 
/full/NXZmcjNqM3ZpMnJuaW5hMnVocGM3bWgwbDAgaW50ZWxsaXNvZnR0ZWFtQG0" 
strHeaders = "Authorization: GoogleLogin auth=" & AuthCode & _ 
"Content-Type:application/atom+xml" 
Responded = False 
Inet1.Execute strURL, "Delete", "", strHeaders 

Do Until Responded = True 
    DoEvents 
Loop 

이다 그러나, 나는 "찾을 수 없습니다 이벤트"등의 반응을 얻고있다 (HTTP/1.1 404 찾을 수 없음), 하지만 난 달력에 이벤트가 url에서 제공 한 eventID.

이벤트를 찾을 수없는 오류가 발생하는 이유를 파악할 수 없습니다.

답변

1

클라이언트 로그인을 사용하거나/feeds/url을 사용해서는 안되며 둘 다 사용되지 않으며 후자는 올해 11 월에 종료됩니다. API v3으로 이전 한 후 문제가 계속되면 질문을 다시 게시하십시오. 설명서는 다음 위치에 있습니다. https://developers.google.com/google-apps/calendar

+0

Access VBA에서 Google Calendar API v3을 사용할 수 있습니까? VBA에서 이것을 사용할 방법이없는 것 같습니다. 우리는 .net에서 그것을 개발해야합니까? –

+0

다음은 클라이언트 라이브러리를 사용하는 VB 용 샘플 코드입니다. http://samples.google-api-dotnet-client.googlecode.com/hg/Calendar.VB.ConsoleApp/README.html – luc

+0

감사하지만 VB에서 사용합니다. net, Microsoft Access에서 수행 할 수있는 VBA (Visual Basic for Applications) 코드 샘플을 찾고 있습니다. –

관련 문제