Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Zend Framework 2 module adding integration with Facebook php-sdk
PHP
Branch: master
Pull request Compare This branch is 2 commits ahead, 12 commits behind widmogrod:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
configs
vendor
.gitmodules
Module.php
README.md
autoload_classmap.php
autoload_function.php
autoload_register.php

README.md

Introduction

FacebookBundle is simple integration with Facebook php-sdk library

Requirements

Installation

Simplest way:

  1. cd my/project/folder
  2. git clone git://github.com/widmogrod/zf2-facebook-module.git modules/FacebookBundle --recursive
  3. open my/project/folder/configs/application.config.php and add 'FacebookBundle' to your 'modules' parameter.

How to use

// in controller
$this->getLocator()->get('facebook') // Facebook object

How to setup

// modules/Application/configs/module.config.php
return array(

    /*
     * User configuration layout
     */
    'FacebookBundle' => array(

        // if set to true then view helper 'HeadScript' will be setup by: var FB_APP_ID = 'yout_app_id';
        'setAppIdInHeadScript' => true,
    ),
    'di' => array(
        'instance' => array(
            'Facebook' => array(
                'parameters' => array(
                    'config'  => array(
                        // set your Facebook application parameters here
                        'appId'  => 'your_app_id',
                        'secret' => 'your_secret',
                    ),
                ),
            ),
        ),
    ),
    // (...)
Something went wrong with that request. Please try again.