PHP code example of junker / facebook-service-provider

1. Go to this page and download the library: Download junker/facebook-service-provider 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/ */

    

junker / facebook-service-provider example snippets


use HSAL\HSAL;
use Junker\Silex\Provider\FacebookServiceProvider;

$app->register(new FacebookServiceProvider(), [
    'facebook.options' => [
        'app_id' => 'my App id',
        'app_secret' => 'my App secret key',
        'default_graph_version' => 'v2.10',
        'default_access_token' => '{access-token}' // optional
    ]
]);

    $response = $app['facebook']->get('/me', '{access-token}');