Package Data | |
---|---|
Maintainer Username: | abhimanyu003 |
Maintainer Contact: | abhimanyusharma003@gmail.com (Abhimanyu Sharma) |
Package Create Date: | 2014-02-07 |
Package Last Update: | 2014-06-02 |
Home Page: | |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-23 03:15:09 |
Package Statistics | |
---|---|
Total Downloads: | 484 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 7 |
Total Watchers: | 4 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Facebook PHP SDK for Laravel
Add below line to composer.json
"abhimanyusharma003/laravel-facebook": "dev-master"
``
Run composer update
or composer install
Open app/config/app.php
and add the service provider to your providers
array.
'providers' => array(
'Abhimanyusharma003\LaravelFacebook\LaravelFacebookServiceProvider',
)
``
Now add the alias.
'aliases' => array(
'Facebook' => 'Abhimanyusharma003\LaravelFacebook\LaravelFacebookFacade',
)
``
php artisan config:publish abhimanyusharma003/laravel-facebook
config.php
file in config\packages\abhimanyusharma003\laravel-facebook
folderconfig.php
with your informationSetting details are.
appid
: Your facebook app id.secret
: Your facebook app secret.redirect
: URL where to redirect after log in.logout
: URL where to redirect after logout.scope
: These are permission you want from your usersRoute::get('/', function(){
return Facebook::loginUrl();
});
``
Route::get('/', function(){
return Facebook::getUser();
});
``
Route::get('/', function(){
$profile = Facebook::api('/me?fields=id,name,first_name,last_name,username,email,gender,birthday,hometown,location,picture.width(100)');
});
``
Route::get('/', function(){
return Facebook::logoutUrl();
});
``