fourlabs/facebook-pages-bundle

Facebook Pages Management for Symfony

v2.0.0 2020-03-21 21:41 UTC

This package is auto-updated.

Last update: 2024-11-22 07:35:39 UTC


README

Build Status StyleCI Coverage Status SensioLabsInsight

Manage your Facebook Pages in Symfony

Installation

Composer installation

    $ composer require fourlabs/facebook-pages-bundle

Add to app/config/AppKernel.php

<?php
    //...
    $bundles = [
        // ...
        new FL\FacebookPagesBundle\FLFacebookPagesBundle(),
    ];

Configuration

# app/config/config.yml
fl_facebook_pages:
    app_id: "%facebook_app_id%"
    app_secret: "%facebook_app_secret%"
    page_manager_class: AppBundle\Entity\FacebookPageManager
    page_class: AppBundle\Entity\FacebookPage
    page_review_class: AppBundle\Entity\FacebookPageReview

    # the following have sensible defaults and can remain unchanged
    page_manager_storage: fl_facebook_pages.storage.doctrine.facebook_user_storage
    page_storage: fl_facebook_pages.storage.doctrine.page_storage
    page_review_storage: fl_facebook_pages.storage.doctrine.page_review_storage
    guzzle_service: guzzle.client.facebook_pages
# app/config/routing.yml
fl_facebook_pages:
    resource: "@FLFacebookPagesBundle/Resources/config/routing.yml"

Facebook App Settings

Since March 2018 Facebook enforces strict callback URL matching. This means that you will have to add the following URL to Valid OAuth Redirect URIs in your Facebook app settings: https://yourdomain.com/fl_facebook_pages/save-auth.

Tests

To run the test suite, you need composer.

    $ composer install
    $ phpunit

License

FacebookPagesBundle is licensed under the MIT license.