承接 fritzmg/contao-facebook-gallery 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fritzmg/contao-facebook-gallery

Composer 安装命令:

composer require fritzmg/contao-facebook-gallery

包简介

Contao extension to integrate a public Facebook album just like a regular Contao gallery.

README 文档

README

Contao Facebook Gallery

Simple extension to allow the integration of a Facebook album via a gallery content element.

Usage

Facebook app

In order to be able to use the content element, you need to create a Facebook app first. Then you can define the Facebook app ID and App Secret in the system settings of Contao, or in the page root settings.

Album ID

Within the content element, you can simply provide the URL to the Facebook album, or its Facebook ID. If you provide the URL to the album, the album ID will be automatically extracted from the URL, if possible.

Access token

Important: due to changes in Facebook's API in 2018 you can no longer access public albums of pages without a valid access token. Otherwise you would have to submit the Page Public Content Access app permission for review.

Thus since version 1.5.0 you have the ability to set a Facebook access token for each album. You can use this tutorial for example on how to create a Facebook Page access token that never expires. The basic steps are:

  1. Create a user access token for your Facebook app within Facebook's Graph Explorer. Important: you must require the manage_pages and the publish_pages permission. Otherwise you will be unable to generate an access token that never expires.
  2. Debug and extend the access token in Facebook's Access Token Debugger.
  3. Use the new access token in the Graph Explorer to make a query on /me/accounts.
  4. Copy the access token for the page from which you want to pull the album from and insert it into the content element.

Note: the Facebook user with which you create this access token must be administrator or developer of the Facebook app and he must be able to manage the album's Facebook page.

Image size

You can also define an image width and/or height (the image size mode will be ignored) - however, this will not be exact. Facebook (usually) provides differently sized images for each image of the album - the content element will try to find the smallest image that is at least as large as the given width and/or height. Thus you'll probably have to resize the images via CSS, to fit in your layout. Or change the gallery_default template and hardcode the given size as an inline style.

Additionally, a srcset from the available resolutions for each image will be created.

Sorting options

Since version 1.4.0 there is a sorting setting. Keep in mind that sorting by ID will only work on systems that use a 64-bit PHP environment, due to the large Facebook IDs.

Template data

For each image of the gallery, there is additional data available via $col->fbData. For example $col->fbData->id contains the Facebook ID of the image and $col->fbData->album->name contains the Facebook album's name. Since version 1.5.0 the Facebook data also contains the Facebook link of the image.

Notes

  • Due to a lack of implementation within the Graph API of Facebook, public albums from Facebook groups cannot be displayed.
  • Currently, the images are always linked directly from Facebook and will not be cached locally.
  • The Facebook Graph API data is cached locally and can be purged in the system maintenance.

Acknowledgements

Development funded by Kosmopiloten.

fritzmg/contao-facebook-gallery 适用场景与选型建议

fritzmg/contao-facebook-gallery 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 131 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「facebook」 「gallery」 「contao」 「Album」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 fritzmg/contao-facebook-gallery 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 fritzmg/contao-facebook-gallery 我们能提供哪些服务?
定制开发 / 二次开发

基于 fritzmg/contao-facebook-gallery 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 131
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2015-05-04