[错误消息][1]
可捕获的致命错误:传递给Facebook \ FacebookRequest :: __ construct()的参数1必须是Facebook \ FacebookSession的实例,是给定的__PHP_Incomplete_Class的实例,在第67行的C:\ xampp \ htdocs \ FB \ download_album.php中调用并在第182行“ strong text”中的C:\ xampp \ htdocs \ FB \ libs \ Facebook \ FacebookRequest.php中定义
if ( isset( $_GET['all_albums'] ) && !empty ( $_GET['all_albums'] ) ) {
if ( $_GET['all_albums'] == 'all_albums' ) {
require_once('libs/Facebook/FacebookSession.php');
// graph api request for user data
$request_albums = new FacebookRequest($session, 'GET', '/me/albums?fields=id,name');
$response_albums = $request_albums->execute();
// get response
$albums = $response_albums->getGraphObject()->asArray();
if ( !empty( $albums ) ) {
foreach ( $albums['data'] as $album ) {
$album = (array) $album;
download_album( $session, $album_download_directory, $album['id'], $album['name'] );
}
}
}
}