https://github.com/codehutlabs/zf2-facebook-skd-module
Zend Framework 2 Facebook SDK Module
https://github.com/codehutlabs/zf2-facebook-skd-module
Last synced: 5 days ago
JSON representation
Zend Framework 2 Facebook SDK Module
- Host: GitHub
- URL: https://github.com/codehutlabs/zf2-facebook-skd-module
- Owner: codehutlabs
- License: other
- Created: 2012-10-30T16:03:01.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-11-19T17:53:53.000Z (about 13 years ago)
- Last Synced: 2024-03-26T20:22:21.110Z (almost 2 years ago)
- Language: PHP
- Size: 200 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
ZF2-Facebook-SKD-Module
=======================
Zend Framework 2 Facebook SDK Module
Include the module in your config/application.config.php
Usage:
-----------------------
use Facebook\Controller\Facebook;
use Facebook\Controller\FacebookApiException;
use \Exception;
And in your class:
-----------------------
public $facebook;
public function __construct() {
$this->facebook = new Facebook(array(
'appId' => 'yourAppId',
'secret' => 'yourSecret'
));
}
Use it in your action function:
-----------------------
try {
$user = $this->facebook->getUser();
} catch (Exception $e) {
print_r($e);
}