widmogrod / zf2-facebook-module
Zend Framework 2 module providing integration with Facebook php-sdk
dev-master
2013-06-19 07:56 UTC
Requires
- php: >=5.3.3
- facebook/php-sdk: v3.2.1
- zendframework/zendframework: 2.*
Requires (Dev)
- zendframework/zendframework: dev-master
This package is auto-updated.
Last update: 2024-12-07 19:23:05 UTC
README
Introduction
FacebookBundle is simple integration with Facebook php-sdk library.
P.S. Sorry for my english. If You wish to help me with this project or correct my english description - You are welcome :)
Requirements
- Zend Framework 2 (https://github.com/zendframework/zf2). Tested on Zend Framework 2.0.0beta4.
- PHP 5.3 or gather
Installation
cd my/project/directory
- Create a
composer.json
file with following content:
{ "require": { "widmogrod/zf2-facebook-module": "dev-master" } }
- Run
php composer.phar install
- 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
<?php return array( /* * Is not required IF 'di->instance->facebook' config section is set. * User configuration layout will be propagated to 'di->instance->facebook' IF 'di->instance->facebook->config' is not set. */ 'FacebookBundle' => array( 'setAppIdInHeadScript' => true, 'appId' => 'your_app_id', 'secret' => 'your_secret', ), 'di' => array( 'instance' => array( 'alias' => array( 'facebook' => 'Facebook', ), /* * Is not required, IF 'FacebookBundle' config section is set. */ 'facebook' => array( 'config' => array( 'appId' => 'your_app_id', 'secret' => 'your_secret', ) ) ), ), ); ?>