Google Calendar API - 如何添加日历小工具以及事件?

问题描述:

我正在尝试添加一个Google日历小工具以及一个事件。但是,无论何时我尝试添加小工具以及事件,Google日历API都会给我一个“无效值”错误。我正在使用event.insert protocol。如果我在没有小工具块的​​情况下发送请求,它会正常工作,并添加一个事件。但是,添加小工具块会引发错误。Google Calendar API - 如何添加日历小工具以及事件?

{ 
"location": "San Jose, CA", 
"description": "blah blah blah blah", 
"kind": "calendar#event", 
"start": { 
    "dateTime": "2012-04-04T10:00:00.000-07:00" 
}, 
"end": { 
    "dateTime": "2012-04-04T10:00:00.000-07:00" 
}, 
"gadget": { 
    "iconLink": "http://www.thefreedictionary.com/favicon.ico", 
    "link": "http://www.thefreedictionary.com/_/WoD/wod-module.xml", 
    "title": "Word of the Day", 
    "type": "application/x-google-gadgets+xml", 
    "height": 136, 
    "width": 300, 
    "display": "icon" 
} 
} 

有没有人知道为什么会发生这种情况?我真的需要找到一种方法将图像插入到我添加到Google日历中的事件中。谢谢!

+0

你能解释一下在Google日历中创建任何事件时如何显示小工具吗? – 2018-02-13 05:42:39

我也遇到过这个问题。在我看来,iconLink和链接必须是https才能工作。