Skip to content

fourlabsldn/FacebookPagesBundle

Repository files navigation

FacebookPagesBundle

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.