1. Go to this page and download the library: Download armetiz/facebook-bundle 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/ */
armetiz / facebook-bundle example snippets
namespace Acme\DemoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HomeController extends Controller {
public function indexAction($facebookId, $facebookToken) {
$facebookSdk = $this->get("armetiz.facebook");
$facebookSdk->setAccessToken($facebookToken);
$userProfile = $facebookSdk->api('/' . $facebookId, 'GET');
}
}