1. Go to this page and download the library: Download pitchanon/facebook-connect library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pitchanon / facebook-connect example snippets
use FacebookConnect;
Route::get('/auth/facebook', function () {
$state = bin2hex(random_bytes(16));
session(['fb_oauth_state' => $state]);
return redirect(FacebookConnect::getLoginUrl(
redirectUri: null, // falls back to config
scopes: ['email', 'public_profile'],
state: $state,
));
});