'; $app_secret = ''; $app_id = ''; $id = ''; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'url' => 'https://www.facebook.com/images/fb_icon_325x325.png', 'published' => 'false', ); echo json_encode((new Page($id))->createPhoto( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);