PHP code example of muvi / facebook

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

    

muvi / facebook example snippets


use FacebookExtended\Facebook;
...
$fbConfig = [
    'app_id' => 'YOUR-FACEBOOK-APP-ID',
    'app_secret' => 'YOUR-FACEBOOK-SECRET-KEY',
    'default_graph_version' => 'v6.0',
];

$fb = new Facebook($fbConfig);

use FacebookExtended\Facebook;
...
$fbConfig = [
    'app_id' => 'YOUR-FACEBOOK-APP-ID',
    'app_secret' => 'YOUR-FACEBOOK-SECRET-KEY',
    'default_graph_version' => 'v6.0',
];

$fb = new Facebook($fbConfig);
$fb->setDefaultAccessToken(YOUR_PAGE_TOKEN);
$chunkSize = 1048576 * 5;
$response = $fb->uploadVideo(YOUR_FACEBOOK_PAGE_ID, YOUR_VIDEO_PATH, [META DATA], null, 5, null, $chunkSize);