Привет всем, такая ситуация. Сайт перестал выводить картинку из поста VK. Раньше в запросе wall.get стоял &v=5.74, сейчас поменял на 5.81 и картинка перестала выводиться. Если обратно откатить на 5.74 то выводит ошибку. Выводит только тест.. Сам запрос: Код (Text): https://api.vk.com/method/wall.get?owner_id=-206341834&count=16&v=5.81&access_token=f419d8f6f419d8f6f419d8f62df46105f6ff419f419d8f695141acece2a70a4b6f260c0 Код (Text): <?php require_once($_SERVER['DOCUMENT_ROOT']. '/modules/settings/settings.php'); require_once($_SERVER['DOCUMENT_ROOT']. '/lang/ru_RU/ru_RU.php'); $file_data = file_get_contents('./data/date.flare'); if ($file_data != ceil(time()/100)) { $news = file_get_contents('https://api.vk.com/method/wall.get?owner_id=-'.$owner_id.'&count=16&v=5.81&access_token='.$access_token.' '); file_put_contents('./data/date.flare', ceil(time()/100)); file_put_contents('./data/cache.flare', $news); $news = json_decode(file_get_contents('./data/cache.flare'), true)['response']; } else { $news = json_decode(file_get_contents('./data/cache.flare'), true)['response']; } $id = 0; foreach($news['items'] as $n) { $id++; foreach($n['attachments'] as $item) { $img = $item['photo']['photo_604']; } if ($n['views']['count'] < 1) $n['views']['count'] = 0; $content = mb_strimwidth($n['text'], 0, 350, "..."); echo '<div class="news-link animated fadeInRight">'; echo '<h3 style="color: #000000" class="news-log"><i class="fa fa-newspaper-o" aria-hidden="true"></i> '.$news_title.' #'.$id.'</h3> '; echo '<div class="poster"> <a target="_blank" href="https://vk.com/'.$owner_url.'?w=wall-'.$owner_id.'_'.$n['id'].'"><img class="xfieldimage foto" src="'.$img.'" alt=""></a></div> '; echo '<p class="description"> '.$content.' </p> <br> '; echo '<a target="_blank" href="https://vk.com/'.$owner_url.'?w=wall-'.$owner_id.'_'.$n['id'].'" class="btn-view"><span class="ic-sx24"></span> '.$news_transition.'</a> '; echo '<span class="time-data"><i class="fa fa-calendar-minus-o" aria-hidden="true"></i> '.date('d.m.Y в H:i',$n['date']).'</span> '; echo '<span class="time-data"><i class="fa fa-eye" aria-hidden="true"></i> '.$news_bottom_views.': '. $n['views']['count'] .'</span> '; echo '<span class="time-data"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> '.$news_bottom_likes.': '. $n['likes']['count'] .'</span> '; echo '<span class="time-data"><i class="fa fa-comment-o" aria-hidden="true"></i> '.$news_bottom_comments.': '. $n['comments']['count'] .'</span> '; echo '</div>'; } ?>
Попробуйте повторно создать токен, в документации есть пункт "Авторизация пользователя". Следует прочесть очень внимательно.