{"id":15672382,"url":"https://github.com/mikahanninen/grav-plugin-facebook","last_synced_at":"2025-05-06T21:22:06.054Z","repository":{"id":43610049,"uuid":"71492660","full_name":"mikahanninen/grav-plugin-facebook","owner":"mikahanninen","description":"Facebook plugin for Grav CMS https://github.com/getgrav/grav","archived":false,"fork":false,"pushed_at":"2019-03-31T20:06:47.000Z","size":2367,"stargazers_count":16,"open_issues_count":9,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T03:02:41.526Z","etag":null,"topics":["facebook-album","facebook-plugin","facebook-post","feed","grav","grav-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikahanninen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-20T18:33:51.000Z","updated_at":"2021-10-27T03:41:04.000Z","dependencies_parsed_at":"2022-09-13T20:30:57.185Z","dependency_job_id":null,"html_url":"https://github.com/mikahanninen/grav-plugin-facebook","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikahanninen%2Fgrav-plugin-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikahanninen%2Fgrav-plugin-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikahanninen%2Fgrav-plugin-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikahanninen%2Fgrav-plugin-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikahanninen","download_url":"https://codeload.github.com/mikahanninen/grav-plugin-facebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252770009,"owners_count":21801463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["facebook-album","facebook-plugin","facebook-post","feed","grav","grav-plugin"],"created_at":"2024-10-03T15:25:08.562Z","updated_at":"2025-05-06T21:22:05.993Z","avatar_url":"https://github.com/mikahanninen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grav Facebook Plugin\n\n`Facebook` is a simple [Grav][grav] Plugin that includes your Facebook page content to your Grav website. Plugin can be used to get any public Facebook page content.\n\n### Posts example\n\n![](assets/facebook_post_example.png)\n\n### Events example\n\n![](assets/facebook_events_example.png)\n\n### Album example\n\n![](assets/facebook_album_example.png)\n\n# Installation\n\nInstalling the Facebook plugin can be done in one of two ways. Using GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.\n\n## GPM Installation (Preferred)\n\nThe simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line).  From the root of your Grav install type:\n\n    bin/gpm install facebook\n\nThis will install the Instagram plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/facebook`.\n\n## Manual Installation\n\nTo install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `facebook`. You can find these files either on [GitHub](https://github.com/mikahanninen/grav-plugin-facebook) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n\nYou should now have all the plugin files under\n\n    /your/site/grav/user/plugins/facebook\n\n# Configuration\n\nYou need to provide few configurations in order for the feed show up. In your Grav Administration panel, go to Plugins \u003e Facebook to view the plugin configuration page.\n\nEnter the Facebook *page_id* which feed you want to show, and your Facebook API *application_id* and *application_secret*.\n\nFor more information how to get application set up, see the [Facebook Developers documentation](https://developers.facebook.com/).\n\n# Customization\n\nTo customize how the your feed looks like, you might want to customize the generated markup. To do that, copy the template file [facebook.html.twig](templates/partials/facebook.html.twig) to your `templates/partials` folder of your theme. For example:\n\n```\n/your/site/grav/user/themes/custom-theme/templates/partials/facebook.html.twig\n```\n\nIt will now override the default markup of the feed. You can tweak it however you like.\n\n# Config Defaults\n\nIf you need to override some plugin default values, the best practise is to copy the [facebook.yaml](facebook.yaml) file into your `users/config/plugins/` folder (create it if it doesn't exist), and then modify there. This will override the default settings.\n\nFacebook *page_id* can be found with service like [Find your Facebook ID](http://findmyfbid.com/).\n\n# Getting Facebook Posts\n\nYou simply need to include a function your template file such as:\n\n```\n{{ facebook_posts() }}\n```\n\nThis will be converted into your Facebook posts as follows:\n\n```\n\u003cdiv id='facebook-posts'\u003e\n{{ sectionTitle }}\n  \u003cdiv class='facebook-post'\u003e\n    \u003ca href='{{ post.link }}' title='Facebook post'\u003e\n    \u003ci class=\"fa fa-envelope post-icon\" aria-hidden='true'\u003e\u003c/i\u003e\u003ch4 class='media-heading'\u003e{{ post.time }}\u003c/h4\u003e\n    \u003cp\u003e{{ post.message }}\u003c/p\u003e\n    {{ post.image }}\n    \u003c/a\u003e\n  \u003c/div\u003e\n  ...\n\u003c/div\u003e\n```\n\n## Filtering by tags\n\nYou can filter Facebook posts by tags function parameter or with config parameter *Tag filter*.\n\n```\n{{ facebook_posts('#MySpecialTag') }}\n```\n\n# Getting Facebook Events\n\nYou simply need to include a function your template file such as:\n\n```\n{{ facebook_events() }}\n```\n\nThis will be converted into your Facebook events as follows:\n\n```\n\u003cdiv id='facebook-events'\u003e\n{{ sectionTitle }}\n\u003ctable\u003e\n  \u003ctr class='facebook-event'\u003e\n    \u003ctd class='start-date'\u003e\n      \u003cspan class='month'\u003e{{ event.start_time.monthName }}\u003c/span\u003e\n      \u003cspan class='day'\u003e{{ event.start_time.day }}\u003c/span\u003e\n    \u003c/td\u003e\n    \u003ctd class='details'\u003e\n      \u003cspan class='name'\u003e{{ event.name }}\u003c/span\u003e\u003cspan class='location'\u003e{{ event.place }}\u003c/span\u003e\n      \u003cspan class='period'\u003e{{ event.period }}\u003c/span\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  ...\n\u003c/table\u003e\n\u003c/div\u003e\n```\n\n# Getting Facebook Album\n\nYou simply need to include a function your template file such as:\n\n```\n{{ facebook_album() }}\n```\n\nIn the above 'album.name' is set at plugin configuration.\nOr you can give album name as function parameter like this:\n\n```\n{{ facebook_album('My Greatest Album') }}\n```\n\nThis will be converted into your Facebook album as follows:\n\n```\n\u003cdiv id='facebook-gallery'\u003e\n\u003ch5\u003eAlbum: {{ album.name }}\u003c/h5\u003e\n\u003cdiv id='facebook-gallery-photos'\u003e\n    \u003cimg src=\"{{ photo.source }}\" width=300 height=200/\u003e\n    ...\n\u003c/div\u003e\n\u003c/div\u003e\n```\n\n## The Unitegallery jQuery plugin\n\n[Unite gallery](http://unitegallery.net/) can be used to display album photos and its theme can be set from the plugin configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikahanninen%2Fgrav-plugin-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikahanninen%2Fgrav-plugin-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikahanninen%2Fgrav-plugin-facebook/lists"}