0

Google でイベントを作成するのに問題があります。コードを実行するときに、同じ Web サイトにある Google のマニュアルを使用しています。

    CreateXML : = TStringList.Create ;
  CreateXML.Add (
  ' <? xml version = encoding = '' 1.0'' '' UTF- 8'' > ' # 13 # 10 +
  '< entry xmlns ='' '' ttp://www.w3.org/2005/Atom ' # 13 # 10 +
    ' xmlns: gd = ttp://schemas.google.com/g/2005 '' ''> ' # 13 # 10 +
  '< category scheme = '' '' ttp://schemas.google.com/g/2005 # kind ' # 13 # 10 +
    ' ttp://schemas.google.com/g/2005 # term = '' event ''> < / category> ' # 13 # 10 +
  ' <title> type=''text''> ' + title + ' < / title> ' # 13 # 10 +
  ' <content type=''text''> ' + content + ' < / content> ' # 13 # 10 +
  '< gd : transparency ' # 13 # 10 +
    ' ttp://schemas.google.com/g/2005 # value = '' '' event.opaque >' # 13 # 10 +
  '< / gd : transparency >' # 13 # 10 +
  '< gd : eventStatus ' # 13 # 10 +
    ' ttp://schemas.google.com/g/2005 # value = '' '' 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> ');

  slPost : = TStringList.Create ;
  slReply : = TStringList.Create ;

  slPost.Values ​​[' accountType '] : = ' HOSTED_OR_GOOGLE ';
  slPost.Values ​​[' email ' ] = email ;
  slPost.Values ​​[' Passwd ' ] = pass ;
  slPost.Values ​​[' service' ] : = ' cl ';
  slPost.Values ​​[' source' ] = '123 ';

  idHTTP1.IOHandler : = IdSSLIOHandlerSocketOpenSSL1 ;
  idHTTP1.Request.ContentType : = ' application / x -www -form- urlencoded ';
  Responsetxt : = idHTTP1.Post ( ' https://www.google.com/accounts/ClientLogin ' SlPost ) ;

  slReply.Delimiter : = # 10;
  slReply.DelimitedText : = Responsetxt ;
  FAuthID : = slReply.Values ​​[' Auth '] ;

  if Length ( FAuthID ) > 0 then
  Begin
  try

      URL : = ' https://www.google.com/calendar/feeds/ ' + NormalizeField (email) + '/ private / full ';

      idHTTP2.IOHandler : = IdSSLIOHandlerSocketOpenSSL1 ;
  IdHTTP2.Request.Connection : = ' Keep- Alive ';
      idHTTP2.Request.ContentType : = ' application / atom + xml' ;
      idHTTP2.Request.CustomHeaders.Values ​​[' GData - Version' ] = '2 .0 ' ;
      idHTTP2.Request.CustomHeaders.Values ​​[ 'Authorization' ] = (' GoogleLogin Auth =' + FAuthID );
    try
      Responsetxt : = idHTTP2.Post (URL , CreateXML );
    except
        on E: EIdHTTPProtocolException do
    begin

 

応答は IdHTTP2 のテキストです

答えはヘッダーにありますが、GsessionID http:/302 変数が表示されないため、ヘッダーに追加できず、idhttp 変数のみが表示されます: SecureLocation と変数 T

この問題で私を助けてくれることを願っています

どうぞよろしくお願いいたします。

私たち Google 翻訳者

4

1 に答える 1