将 Google 相册相册嵌入 HTML

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39569045/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 13:49:47  来源:igfitidea点击:

Embedding Google Photos album to HTML

htmlgoogle-photos

提问by Lior Magen

I have an images slideshow that is based on a Picasa widget.

我有一个基于 Picasa 小部件的图像幻灯片。

A few months ago Picasa stopped working and everything moved to Google Photos & Google Drive.

几个月前,Picasa 停止工作,所有内容都转移到了 Google 相册和 Google 云端硬盘。

Iv'e searched the web for a compatible widget that will corporate with Google Photos without any luck.

我在网上搜索了一个兼容的小部件,它可以与谷歌照片合作,但没有任何运气。

I'm looking for such (simple) widget that works with Google Photos for showing my images as a slideshow.

我正在寻找这样的(简单的)小部件,它可以与 Google 相册一起使用,以将我的图像显示为幻灯片。

Any suggestions?

有什么建议?

回答by pavex

I wrote this widget to embed google photos gallery into website. Here is a site to generate code for website. https://www.publicalbum.org/embedding-google-photos-albums. It is quite similar as picasa widget. Maybe it will be usefull to solve your prolem.

我写了这个小部件来将谷歌照片库嵌入网站。这是一个为网站生成代码的网站。 https://www.publicalbum.org/embedding-google-photos-albums。它与 picasa 小部件非常相似。也许解决您的问题会很有用。

回答by luv4code

If you have some image files, just upload them to a public folder on your Google Drive, copy its folder ID from the address bar (e.g. 0B0Gi4v5omoZUVXhCT2kta1l0ZG8) and paste it into a form at GDrives, then choose your own alias (e.g. myimgs) and voila! You can access the images one by one using

如果您有一些图片文件,只需将它们上传到 Google Drive 上的公共文件夹,从地址栏中复制其文件夹 ID(例如 0B0Gi4v5omoZUVXhCT2kta1l0ZG8)并将其粘贴到GDrives的表单中,然后选择您自己的别名(例如 myimgs)和瞧!您可以使用

e.g. http://gdriv.es/myimgs/myimage.jpg.

例如http://gdrive.es/myimgs/myimage.jpg

If you want to embed a whole folder on your website (in a frame), you can use one of the following URLs, replacing [folderID] with your own ID:

如果您想在您的网站上嵌入整个文件夹(在框架中),您可以使用以下 URL 之一,将 [folderID] 替换为您自己的 ID:

  1. gdriv.es/myimgs/

  2. docs.google.com/folder/d/[folderID]/preview?rm=minimal

  3. drive.google.com/folderview?id=[folderID]

  1. gdrive.es/myimgs/

  2. docs.google.com/folder/d/[folderID]/preview?rm=minimal

  3. drive.google.com/folderview?id=[folderID]

If you prefer to get the file list in XML or JSON, you can use YQL.

如果您更喜欢以 XML 或 JSON 格式获取文件列表,则可以使用 YQL。

Note: You can use Google+ Photos to host ans embed your images as well.

注意:您也可以使用 Google+ 照片来托管和嵌入您的图片。

回答by Ashwin Anandani

I was just looking for a way to do this myself and found that the easiest way would be using Google Drive to store the photos instead and then embedding them with HTML as per the instructions here: https://confluence.biola.edu/display/itservices/How+to+Embed+Images+from+Google+Drive+in+a+Web+Page

我只是在寻找一种自己做这件事的方法,发现最简单的方法是使用 Google Drive 来存储照片,然后按照此处的说明将它们嵌入 HTML:https: //confluence.biola.edu/display /itservices/How+to+Embed+Images+from+Google+Drive+in+a+Web+Page

It may need some styling or free source code to look like a slideshow (or copy part of the iframe code from YouTube's embed button perhaps?)

它可能需要一些样式或免费源代码才能看起来像幻灯片(或者从 YouTube 的嵌入按钮复制部分 iframe 代码?)