Возникает такая ошибка, хотя стоит последняя версия
Array ( [error] => Array ( [error_code] => 8 [error_msg] => Invalid request: v is required. Version param should be passed as "v". "version" param is invalid and not supported. [request_params] => Array ( [0] => Array ( [key] => owner_id [value] => 51448602 ) [1] => Array ( [key] => album_id [value] => 286941183version=5.131 ) [2] => Array ( [key] => method [value] => photos.get ) [3] => Array ( [key] => oauth [value] => 1 ) ) ) )
PHP
<?php
$params = array(
'v' => '5.131', // Версия API
'access_token' => ' ', // Токен
'owner_id' => ' ' , // ID пользователя
);
if (!$query = @file_get_contents('https://api.vk.com/method/photos.get?owner_id=64948812&album_id=286941183' . http_build_query($params))) {
$error = error_get_last();
throw new Exception('HTTP request failed. Error: ' . $error['message']);
}
$result = json_decode($query,true);
print_r($result);
?>