PHPackages                             fritzmg/contao-facebook-gallery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fritzmg/contao-facebook-gallery

ActiveContao-module[Utility &amp; Helpers](/categories/utility)

fritzmg/contao-facebook-gallery
===============================

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

1.5.1(6y ago)1131[1 issues](https://github.com/fritzmg/contao-facebook-gallery/issues)LGPL-3.0-or-laterPHPPHP &gt;=5.2

Since May 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/fritzmg/contao-facebook-gallery)[ Packagist](https://packagist.org/packages/fritzmg/contao-facebook-gallery)[ Docs](http://www.inspiredminds.at)[ RSS](/packages/fritzmg-contao-facebook-gallery/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (25)Used By (0)

[![](https://camo.githubusercontent.com/107cdbc6a67ec677b7459f72c05d13f2de1ea897382420addec98c9d70988496/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323031392e737667)](https://github.com/fritzmg/contao-facebook-gallery)[![](https://camo.githubusercontent.com/54f09db7d26cb38e9266cb7a3b780f8920b9d9a344ffae9bbfecd27a8c608521/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667269747a6d672f636f6e74616f2d66616365626f6f6b2d67616c6c6572792e737667)](https://packagist.org/packages/fritzmg/contao-facebook-gallery)[![](https://camo.githubusercontent.com/26c091a7f231f990beab7d494e0bc96a80c798e313339411408be649c4d36058/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667269747a6d672f636f6e74616f2d66616365626f6f6b2d67616c6c6572792e737667)](https://packagist.org/packages/fritzmg/contao-facebook-gallery)

Contao Facebook Gallery
=======================

[](#contao-facebook-gallery)

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

Usage
-----

[](#usage)

### Facebook app

[](#facebook-app)

In order to be able to use the content element, you need to create a [Facebook app](https://developers.facebook.com) 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

[](#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

[](#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](https://developers.facebook.com/docs/apps/review/feature/#reference-PAGES_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](https://sujipthapa.co/blog/generating-never-expiring-facebook-page-access-token) 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

[](#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

[](#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
-------------

[](#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
-----

[](#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
----------------

[](#acknowledgements)

Development funded by [Kosmopiloten](http://www.kosmopiloten.at).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Recently: every ~140 days

Total

24

Last Release

2553d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f6ec05570f72d0fcc4d0a4fef2309799d53badf8b30484284e73724661e0d8?d=identicon)[fritzmg](/maintainers/fritzmg)

---

Top Contributors

[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (19 commits)")

---

Tags

facebookcontaogalleryAlbum

### Embed Badge

![Health badge](/badges/fritzmg-contao-facebook-gallery/health.svg)

```
[![Health](https://phpackages.com/badges/fritzmg-contao-facebook-gallery/health.svg)](https://phpackages.com/packages/fritzmg-contao-facebook-gallery)
```

###  Alternatives

[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
