0

I need help .

I want to create events on google calendar with a desktop application , when the parameters sent url = 'https://www.google.com/calendar/feeds/emaill%40gmail.com/private/full'; and then add xml where this event to create

createXML := '<?xml version=''1.0'' encoding=''UTF-8''?>'#13#10 +
                  '<entry xmlns=''http://www.w3.org/2005/Atom'''#13#10 +
                  'xmlns:gd=''http://schemas.google.com/g/2005''>'#13#10 +
                  '<category scheme=''http://schemas.google.com/g/2005#kind'''#13#10 +
                  'term=''http://schemas.google.com/g/2005#event''></category>'#13#10 +
                  '<title type=''text''>' + title + '</title>'#13#10 +
                  '<content type=''text''>' + content + '</content>'#13#10 +
                  '<gd:transparency'#13#10 +
                  'value=''http://schemas.google.com/g/2005#event.opaque''>'#13#10 +
                  '</gd:transparency>'#13#10 +
                  '<gd:eventStatus'#13#10 +
                  'value=''http://schemas.google.com/g/2005#event.confirmed''>'#13#10 +
                  '</gd:eventStatus>'#13#10 +
                  '<gd:where valueString=''' + location + '''></gd:where>'#13#10 +
                  '<gd:when startTime=''' + EventStartTime + ''''#13#10 +
                  'endTime=''' + EventEndTime + '''></gd:when>'#13#10 +
                  '</entry>';

When I do the POST process the next header appears

HTTP/1.0 302 Moved Temporarily
Expires: Wed, 30 April 2014 17:37:17 GMT
Date: Wed, 30 April 2014 17:37:17 GMT
Set- Cookie: T=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
Expires = Tue, 13 -May- 2014 10:32:28 GMT;
SecureLocation : https://www.google.com:443/calendar/feeds/default/private/full?t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content- Type: text / html ; charset = UTF -8
Cache- Control: private , max -age = 0
X -Content -Type -Options : nosniff
X -Frame -Options : SAMEORIGIN
X -XSS -Protection : 1; mode = block
Server : GSE
Alternate -Protocol : 443: quic

In the manual, Google listed me I need a variable called " GSessionID " but does not appear to me,
I would please help me with this problem . I have two projects with authentication: ClientLogin and OAuth 2.0 as I get to get this parameter? Thanks a lot.

Us Google Translator

  • 1
    On a side note, I strongly recommend building your XML another way using XML tools, but either way, you definitely shouldn't rely on such a huge assignment in one statement. At least break it into chunks. – Jerry Dodge Apr 30 '14 at 23:13
  • @JerryDodge The procedure is attached so they can display as totally, the xml will use the tools but I need to first create the event in google calendar. Is it a problem with the xml? – DeveloperPop Apr 30 '14 at 23:19
  • The most common mistakes occur when manually creating XML data with no regards to the proper formatting. Using XML tools will prevent these accidents and format everything perfectly. – Jerry Dodge Apr 30 '14 at 23:23
  • @JerryDodge Yes,did not allow me to enter the newly links but I see it was because I had to be as code – DeveloperPop Apr 30 '14 at 23:39
  • It has to work to retrieve the newly loaded gsessionID condition Realize post procedure twice, the second in the exception – DeveloperPop May 14 '14 at 19:36

1 Answers1

0

It has to work to retrieve the newly loaded gsessionID condition Realize post procedure twice, the second in the exception

  try
  idHTTP2.Post(URL,XML);
  except on E: EIdHTTPProtocolException do
    idHTTP2.Post(URL,XML);
  end;

Thanks for your time.