[CalendarService].insertEntry( アドレス, [CalendarEventEntry], コールバック関数,最後の「オブジェクトの種類」は、google.gdata.calendar.CalendarEventEntryを指定します。また例外用関数は、ここではhandleError関数をそのまま再利用しています。
例外用関数, オブジェクトの種類 )
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
1.ログインの処理 var scope = "https://www.google.com/calendar/feeds/"; var token = google.accounts.user.login(scope); 2.ログインチェック var scope = "https://www.google.com/calendar/feeds/"; token = google.accounts.user.checkLogin(scope); if (token == ""){ alert("ログインしてないよ!"); return; } 3.CalendarEventEntryの作成 var entry = new google.gdata.calendar.CalendarEventEntry(); 4.タイトルの設定 entry.setTitle(google.gdata.atom.Text.create(title)); 5.日時情報の設定 var when = new google.gdata.When(); when.setStartTime(start); when.setEndTime(end); entry.addTime(when); 6.コールバック関数の用意 var func = function(result) { alert("イベントを追加しました。"); getMyFeed(); } 7.エントリーを追加する service.insertEntry(url,entry,func,handleError, google.gdata.calendar.CalendarEventEntry);
<< 前へ |