我正尝试使用Google API创建caledar,它只是返回我帐户中的日历列表,就像我发送GET请求一样。这里是我的代码:通过ColdFusion在Google API中创建日历时遇到困难
<cfxml variable="locals.xml">
<cfoutput>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gCal="http://schemas.google.com/gCal/2005">
<title type="text">#arguments.argTitle#</title>
<summary type="text">#arguments.argSummary#</summary>
<cfif len(arguments.argTimezone)><gCal:timezone value="#arguments.argTimezone#"></gCal:timezone></cfif>
<gCal:hidden value="false"></gCal:hidden>
<gCal:accesslevel value="owner" />
<gCal:color value="#arguments.argColor#"></gCal:color>
<gd:where rel='' label='' valueString='Oakland'></gd:where>
</entry>
</cfoutput>
</cfxml>
<cfhttp url="#variables.baseURL#/default/owncalendars/full" method="post" redirect="false" multiparttype="related" charset="utf-8">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#getAuth(variables.serviceName)#">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="GData-Version" value="2">
<cfhttpparam type="body" value="#trim(locals.xml)#">
</cfhttp>
任何帮助,将不胜感激。
雷卡姆登有一些一些goog le api - 你检查了他的博客吗? – Antony 2009-08-03 22:50:26
是的......我正在使用他的api,我正在扩展使用日历(他的代码不包含文档和分析)。我写了一个函数,它可以成功地获取帐户中的日历。但是,我正在遵循我在所看到的所有网站上看到的示例以及google api页面,并且似乎无法让它创建日历,因为它忽略了我发送的标头信息。 – KingErroneous 2009-08-04 15:59:50
我想通了......我没有通过gSessionId,重定向失去了标题信息......感谢您的帮助。 – KingErroneous 2009-08-04 23:18:21