muhamadrezaar/facebook

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Laravel5 Facebook

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

This package is not auto-updated.

Last update: 2021-11-24 12:09:14 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);
});