我一直在尝试使用谷歌驱动器API来使Fusiontable公开可读,并且一直无法让它工作。我可以使用OAuth 2.0 Playground为其他Google Drive文档插入公共共享权限,但对于Fusiontables,我收到HTTP 500错误“内部错误”。请注意,我已尝试包括“Drive API v2”和“Fusion Tables API v1”下的所有范围。谷歌云端硬盘API调用插入公共共享权限导致内部错误
我知道Google不再开发和支持Fusiontables了,但是我想知道是否有人找到了解决方法,让他们解决这个问题?我还没有尝试过旧版/弃用版的API。
以下是实际的API请求格式和OAuth Playground对Fusiontable权限插入(HTTP 500),然后是Doc权限插入(HTTP 200)的响应。请求之间唯一的区别是在请求URI的fusiontable_id或DOCUMENT_ID:
请求:
POST /drive/v2/files/<fusiontable_id or document_id>/permissions HTTP/1.1
Host: www.googleapis.com
Content-length: 33
Content-type: application/json
Authorization: Bearer <access_token>
{"role":"reader","type":"anyone"}
Fusiontable响应:
HTTP/1.1 500 Internal Server Error
Content-length: 180
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Tue, 04 Nov 2014 23:51:58 GMT
Vary: Origin,Referer,X-Origin
Server: GSE
Cache-control: private, max-age=0
Date: Tue, 04 Nov 2014 23:51:58 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{
"error": {
"code": 500,
"message": "Internal Error",
"errors": [
{
"domain": "global",
"message": "Internal Error",
"reason": "internalError"
}
]
}
}
文件响应:
HTTP/1.1 200 OK
Content-length: 281
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Vary: Origin,Referer,X-Origin
Server: GSE
Etag: "M4l5RvCt2StP2jOGfgyJPGdTZTc/dgFZz37LrQjIXplUkmnh3VtemzQ"
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
Date: Wed, 05 Nov 2014 15:35:56 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{
"kind": "drive#permission",
"etag": "\"M4l5RvCt2StP2jOGfgyJPGdTZTc/dgFZz37LrQjIXplUkmnh3VtemzQ\"",
"role": "reader",
"type": "anyone",
"id": "anyone",
"selfLink": "https://www.googleapis.com/drive/v2/files/<document_id>/permissions/anyone"
}
澄清:“谷歌不再开发和支持Fusiontables”不是这样的,而这种想法是从哪里来的我会听取有趣:-)如果您使用实际的Fusion Tables文档ID将此问题发送到[email protected],我们可以查看我们的日志以找出问题所在。 – 2014-11-05 19:57:30
谢谢Rod,我会按照你的建议跟进。我认为Fusion Tables开发已停止,因为[Fusion Tables API用户组](https://groups.google.com/forum/#!forum/fusion-tables-users-group)不再受到监控,并且[问题重新加载谷歌电子表格](https://code.google.com/p/fusion-tables/issues/detail?id=675&q=import%20fails&colspec=ID%20Type%20Status%20Summary%20Stars%20Component)似乎已经够老了并且足够重要,以至于如果Fusion Tables仍在开发中,它将会得到修复。 – 2014-11-06 16:17:43
我应该重新说明那里的“没有被监控”的言论,以澄清金融时报活跃,只是不在该名单上。至于电子表格导入的事情,在那段时间所有的Drive应用程序都有一个普遍的问题,它们会有相同的症状,但不是同一个原因。电子表格导入现在是稳定的。 – 2014-11-06 22:50:14