Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmyers/fuel-facebook
A Facebook Package for Fuel
https://github.com/dmyers/fuel-facebook
Last synced: 1 day ago
JSON representation
A Facebook Package for Fuel
- Host: GitHub
- URL: https://github.com/dmyers/fuel-facebook
- Owner: dmyers
- License: mit
- Created: 2012-03-30T00:11:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-05T17:04:44.000Z (about 11 years ago)
- Last Synced: 2023-03-14T08:20:23.974Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 145 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fuel Facebook Package
A super simple Facebook package for Facebook's PHP SDK for Fuel.
## About
* Version: 1.0.0
* License: MIT License
* Author: Derek Myers## Installation
Simply add the following to your composer.json require block:
'facebook/php-sdk'
### Git Submodule
If you are installing this as a submodule (recommended) in your git repo root, run this command:
$ git submodule add git://github.com/dmyers/fuel-facebook.git fuel/packages/facebook
Then you you need to initialize and update the submodule:
$ git submodule update --init --recursive fuel/packages/facebook/
### Download
Alternatively you can download it and extract it into `fuel/packages/facebook/`.
## Usage
```php
$facebook = Facebook::instance();
$user = $facebook->getUser();if ($user) {
try {
$userInfo = $facebook->api('/me');
echo $userInfo['name'];
} catch (FacebookApiException $e) {
echo $e->getMessage();
}$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl();
}
```For more examples, check out the [Facebook PHP SDK](https://github.com/facebook/facebook-php-sdk).
## Configuration
Configuration is easy. First thing you will need to do is to [register your app with Facebook](https://developers.facebook.com/apps) (if you haven't already).
Next, copy the `config/facebook.php` from the package up into your `app/config/` directory. Open it up and enter your API keys.
## Updates
In order to keep the package up to date simply run:
$ git submodule update --recursive fuel/packages/facebook/