除非登录 Google 帐户,否则不会显示嵌入式 Google 日历

goo*_*007 2 iframe calendar google-calendar-api

我正在尝试使用 iframe 在我制作的小型网站中嵌入我的 Google 日历,但似乎只有在我登录 Google 帐户时才能看到日历。如果我退出我的 Google 个人资料然后打开页面,我只会得到一个空的 iframe。

我知道这是可能的,因为我已经看到其他网站在我未登录 Google 时显示日历,但是查看他们的代码我看不出与我所拥有的有何不同。

我收到错误:

Refused to display 'googleCalendarLinkHere' in a frame because it set 'X-Frame-Options' to 'DENY'.
Run Code Online (Sandbox Code Playgroud)

Chr*_*oms 7

将您的日历设置为公开可见。