验证融合表更新或插入行

时间:2014-10-13 18:22:19

标签: google-maps coldfusion google-fusion-tables

我有一张谷歌地图,我使用融合表创建了我们的俱乐部位置,我正在尝试使用我的网站代码中的查询进行更新。到目前为止,我们每次要更新地图时都必须创建一个新的融合表。最终目标是让它至少每月更新一次,更新旧信息并添加新的俱乐部。这是我最终希望能够在http://www.optimist.org/join.cfm

上执行此操作的实时页面
<cfhttp  url="https://www.google.com/accounts/ClientLogin"  method="post" charset="utf-8">
<cfhttpparam type="formfield" name="accountType" value="GOOGLE"></cfhttpparam>
<cfhttpparam type="formfield" name="Email" value="Email"></cfhttpparam>
<cfhttpparam type="formfield" name="Passwd" value="*Password"></cfhttpparam>
<cfhttpparam type="formfield" name="accountType" value="GOOGLE"></cfhttpparam>
<cfhttpparam type="formfield" name="service" value="fusiontables"></cfhttpparam>
</cfhttp>

<cfoutput>
    #cfhttp.fileContent#
</cfoutput>

<cfset authToken = listtoarray(cfhttp.FileContent,"=")[4]>
<br /><br /><cfoutput>#authToken#</cfoutput><br /><br />

<cfhttp method="post" url="https://www.googleapis.com/fusiontables/v1/query" charset="utf-8">
<cfhttpparam type="formfield" name="sql" value="INSERT INTO 17FBjtJoIQBK9ukBHTFlGmqX-DJRojZ4J9II2M3na (FullAddress, NbrOfMbrs) VALUES ('4494 Lindell Blvd St Louis MO 63108 United States', 11);"/>
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#authToken#"/>
</cfhttp>

<cfoutput>
    #cfhttp.fileContent#
</cfoutput>

这就是我回来的原因

{ "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", 
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", 
"extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily 
Limit for Unauthenticated Use Exceeded. Continued use requires signup." } }

0 个答案:

没有答案