Вот правильное решение.Вам нужен токен доступа откуда-то.В моем случае я получаю это в другой момент.И я загружаю видео, когда пользователь не в сети.
require 'php-sdk/src/facebook.php';
.
$facebook = new Facebook(array(
'appId' => 'xxxxxxxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
));
$facebook->setAccessToken("myaccesstokenhere");
$facebook->setFileUploadSupport(true);
$args = array('title' => 'The title of the video','description'=>'The description of the video');
$args['videoData'] = '@' . realpath($_SERVER['DOCUMENT_ROOT']."/uploads/video.mp4");
try {
$data = $facebook->api('/me/videos', 'post', $args);
} catch (FacebookApiException $e) {
echo "result=ERROR&message=".$e->getMessage();
die();
}