2012-03-12 3 views
0

これは非常に奇妙です。私は共有のGoogleカレンダーでfullcalendarの基本機能を確立しようとしています。私は単にgcalのデモ「gcal.html」を自分のカレンダーURLに置き換えようとしました。カレンダーはそれ自身で正常に開きます。ここではいくつかのコードは次のとおりです。Googleカレンダーの予定を表示するためにフルカレンダーを取得できません。

<head> 
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> 
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' /> 
<script type='text/javascript' src='../jquery/jquery-1.7.1.min.js'></script> 
<script type='text/javascript' src='../jquery/jquery-ui-1.8.17.custom.min.js'></script> 
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script> 
<script type='text/javascript' src='../fullcalendar/gcal.js'></script> 
<script type='text/javascript'> 

    $(document).ready(function() { 

     $('#calendar').fullCalendar({ 
     header: { 
       left: 'prev,next today', 
       center: 'title', 
       right: 'month,basicWeek,basicDay' 
      }, 
      // US Holidays 
      events: 'https://www.google.com/calendar/embed?src=r9k375tdhq8auc1oc4kgmhpri4%40group.calendar.google.com&ctz=America/Chicago', 
      eventClick: function(event) { 
       // opens events in a popup window 
       window.open(event.url, 'gcalevent', 'width=700,height=600'); 
       return false; 
      }, 

      loading: function(bool) { 
       if (bool) { 
        $('#loading').show(); 
       }else{ 
        $('#loading').hide(); 
       } 
      } 

     }); 

    }); 

</script> 

私はほとんど私がGCALデモでいますので、私は、右のすべての依存関係などを持っていることを確信しています。アドレスバーにURLを差し込むと、カレンダーが開きます。このカレンダーは公開予定です。どんな助けもありがとう。私がそれを働かせることができれば、Googleカレンダーのフルカレンダーは良いペアリングのようだ。

答えて

1

あなたは正しいURLを使用していません。 FullCalendarは、あなたがそれを与えるカレンダー全体ではなく、XMLフィードを望んでいます。

See the documentation。以下の手順に従って

試してみてください。

In the Google Calendar interface, locate the "My Calendar" box on the left 
Click the arrow next to the calendar you need. 
A menu will appear. Click "Calendar settings." 
In the "Calendar Address" section of the screen, click the XML badge. 
Your feed's URL will appear. 
:あなたのカレンダーのXMLフィードのURLを取得する必要があり、その後

In the Google Calendar interface, locate the "My Calendar" box on the left. 
Click the arrow next to the calendar you need. 
A menu will appear. Click "Share this calendar." 
Check "Make this calendar public." 
Make sure "Share only my free/busy information" is unchecked. 
Click "Save." 

あなたはまず自分のGoogleカレンダーを公開する必要があります

私はこれがあなたが望むURLだと信じています

https://www.google.com/calendar/feeds/r9k375tdhq8auc1oc4kgmhpri4%40group.calendar.google.com/public/basic

+0

ありがとうBrandon!それは愚かなものだとわかっていましたが、私の目はそれを見ませんでした。ありがとう! – Will

+0

@ウィル、問題ありません。これで問題が解決した場合は、チェックマークを選択することで、受け入れられた回答としてマークすることができます。 – Brandon

関連する問題