muhamadrezaar/facebook

Laravel5 Facebook

dev-master 2016-04-18 15:16 UTC

This package is not auto-updated.

Last update: 2024-11-21 02:56:12 UTC


README

Total Downloads Latest Stable Version License

Laravel 5 Facebook Package

catatan : Sedang tahap development masih baru

Cara instal

Tambahkan ke composer

composer require muhamadrezaar/facebook:"dev-master"

Register Provider dan Facade di config/app.php

Reza\RezaProvider::class,
'FB'=> Reza\RezaFacade::class,

Publish konfigurasi

php artisan vendor:publish

resgistrasi aplikasi facebokk anda di config/FacebookConfig.php

<?php
return [
	'app_id' => 'YourAppID',
	'app_secret' => 'YourAPpSecret',
	'default_graph_version' => 'v2.5',
	'callback_url'	=> 'http://localhost:90'	
];

Dokumentasi

Menggenerate Url Authorize Facebook

<?php
Route::get('login' , function(){
	@session::start();
	echo "<a href = '".\FB::generateUrlLogin(url('dapet'))."'>Login</a>";
});

Mendapatkan hasil callback login facebook

<?php
Route::get('dapet' , function(){
		@session_start();
		$dapet = \FB::getCallBack();
		dd($dapet);
});