javascript 我的网站的 Facebook 照片库小部件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8145412/
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-10-26 02:27:23  来源:igfitidea点击:

Facebook photo gallery widget for my website?

phpjavascriptfacebookfacebook-graph-api

提问by zechdc

Is there a widget to get all albums and photos from a facebook page and display them in a simple grid on my website?

是否有一个小部件可以从 Facebook 页面获取所有相册和照片,并将它们显示在我网站上的简单网格中?

Preferably, the widget would use PHP, JavaScript, or a combination.

小部件最好使用 PHP、JavaScript 或组合。

I have a client who wants to display all the pictures found on their facebook business page on their website. I could manually download and upload each picture from facebook to his website, but I figured this would be a good place to use Facebook's api.

我有一个客户想要显示在他们网站上的 Facebook 业务页面上找到的所有图片。我可以手动将每张图片从 facebook 下载并上传到他的网站,但我认为这将是使用 Facebook api 的好地方。

采纳答案by zechdc

Here is a simple widget. Created it in about 3 hours so its not perfect but it works.

这是一个简单的小部件。在大约 3 小时内创建它,所以它并不完美,但它有效。

There is no CSS styling either so you can easily style it up.

也没有 CSS 样式,因此您可以轻松设置样式。

https://github.com/zechdc/Facebook-Photo-Gallery-Widget

https://github.com/zechdc/Facebook-Photo-Gallery-Widget

回答by acSlater

I'm assuming that you want the page to display images that are currently on the page, so when the photos are updated on the business page the website is also updated?

我假设您希望页面显示当前页面上的图像,那么当业务页面上的照片更新时,网站也会更新?

If so see this below tutorial:

如果是这样,请参阅以下教程:

http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html

http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html

Looking at the reference to their Graph APIit doesn't look to hard, all you need is a photo album id and you can get the photo album as a JSON object:

查看对他们的Graph API的引用,它看起来并不难,您只需要一个相册 ID,您就可以将相册作为 JSON 对象获取:

https://graph.facebook.com/99394368305(Coca-Cola's wall photos)

https://graph.facebook.com/99394368305(可口可乐的墙上照片)

回答by user2142214

You can try SlideshowFx plugin (http://www.oopstouch.com) proposed for Joomla and WordPress. Initially based on Picasa, they port the plugin to Flickr and Facebook. A lot of option available. Check demo here: http://www.oopstouch.comRegards, Jo?l

您可以尝试为 Joomla 和 WordPress 推荐的SlideshowFx 插件 ( http://www.oopstouch.com)。最初基于 Picasa,他们将该插件移植到 Flickr 和 Facebook。有很多选择。在此处查看演示:http://www.oopstouch.com 问候,乔?l

回答by xEmaSen

I use this super duper quick solution. Just replace "{FACEBOOK-PAGE-ID-HERE}" with your facebook page id.

我使用这个超级骗子快速解决方案。只需将“{FACEBOOK-PAGE-ID-HERE}”替换为您的 Facebook 页面 ID。

<iframe src="http://facebookgalleria.com/gallery.php?id={FACEBOOK-PAGE-ID-HERE}" scrolling="no" marginheight="0" frameborder="0" width="551" style="height: 769px;"></iframe>