1. Go to this page and download the library: Download joomla/facebook 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/ */
joomla / facebook example snippets
use Joomla\Facebook\Facebook;
$facebook = new Facebook;
use Joomla\Facebook\Facebook;
use Joomla\Facebook\OAuth;
$options = array(
'clientid' => $app_id,
'clientsecret' => $app_secret,
'redirecturi' => $callback_url,
'sendheaders' => true,
'authmethod' => 'get'
);
$oauth = new OAuth($options);
$facebook = new Facebook($oauth);
// Set the stored access token.
$oauth->setToken($token);
$access_token = $oauth->authenticate();