google-api - 缩略图 404 错误

标签 google-api google-drive-api google-api-java-client

我正在尝试获取文件的缩略图,但收到错误 404,返回驱动器的 url 在某些文件中是这样的

https://docs.google.com/feeds/vt?gd=true&id=1DnoJzxnZXVERyqC5jfTwfpd8uEn&v=39&s=AMedNnoAAAAAUL0gv5da9U81UzT-L4N59b1BwNuZmzgU&sz=s220

但在其他人是

https://lh6.googleusercontent.com/ACwqFdvBX0NUJO6SR9fyemnCnSel-TpCZTaddu9CEkZqxtQpJY84cP_cFj64CA6=s220

最后一个来自 picasa 并且有效,所以显然有效的 url 来自 picasa,我怎样才能像最后一个一样获取所有文件的 url?

最佳答案

我遇到了同样的问题。

您应该将访问 token 附加到缩略图链接 URL,这将授权您的 GET 请求。

所以像:

var thumbLink = driveEntry["thumbnailLink"] + "&access_token=" + YOURTOKEN;

干杯。

关于google-api - 缩略图 404 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13691216/

相关文章:

objective-c - 如何使用You Tube数据API第3版 objective-c 与最终用户分享我的YouTube播放列表

Spring框架 "A redirect is required to get the users approval"

java - 使用来自 GAE API 的 endpointscfg 生成 Java 客户端库时出现 HTTP 500 错误

image - Bing/Google/Flickr API:您将如何查找包含15万个日语句子的图像?

node.js - 如何使用 Google Drive Node.js 断点续传

javascript - 如何删除 google api 图表折线图中的注释刻度线?

google-drive-api - Python Google Drive API file-delete() 方法损坏

oauth - 如何在 Meteor 帐户中请求额外的 oauth 范围

google-drive-api - 具有 drive.file 范围的更改提要的预期行为是什么?

android - 使用 android 访问 picasa