我对这里的一件事感到困惑。我有一个工作页面,旨在从/向谷歌融合表读/写。现在,我有这个工作...但它只适用于我在Google Cloud Developer Console上生成Client_ID的电子邮件地址。我希望此应用程序与任意公共用户一起使用。我觉得这与使用“Web应用程序的客户端ID”凭据的客户端ID生成的电子邮件地址代码有关。
请参阅实时版本以供参考。 http://www.bneigher.com/FusionTable/
我的代码:
// This is for authorizing the table for read (Top of page)
gapi.auth.authorize({
client_id: $scope.clientId,
scope: $scope.scopes,
immediate: $scope.immediate
}, handleAuthResult);
。 。
// This is when a POST is invoked to write
runClientRequest({
path: path,
body: body,
headers: {
'Authorization': 'Bearer ' + $scope.accessToken,
'Content-Type': 'application/x-www-form-urlencoded'
},
method: 'POST'
}, callback('insert-data-output'));
我需要做些什么才能让你的工作...例如,你写到桌子上?
可以在http://www.bneigher.com/FusionTable/js/controller.js找到逻辑的完整代码以供参考。
谢谢你们
答案 0 :(得分:0)
Google不允许您让任何人编辑您的表格。它有一个关于协作数据收集的小tuto(https://support.google.com/fusiontables/answer/2584135?hl=fr但它没有扩展(编辑需要有一个谷歌帐户,并且被所有者专门授予编辑该表的权利)。
您可能想要使用的是"服务帐户"。然后,身份验证将在服务帐户级别而不是在用户级别进行。您可以在以下问题的答案中找到更多详细信息: Upgrading to Google Fusion Tables to Google API V.1