Answer the question
In order to leave comments, you need to log in
Getting a VK token does not work, what could be the problem?
There is such a file, vk-login.php:
<?php
define('ID', '79*****');
define('SECRET', '9LQ8**************S0');
define('URI', 'https://www.***********.com/admin/comp/vk-login.php');
if(!isset($_GET['code'])) {
echo 'error';
exit;
}
$ouri = 'https://oauth.vk.com/access_token?client_id='.ID.'&client_secret='.SECRET.'&redirect_uri='.URI.'&code='.$_GET['code'].'&v=5.131';
$token = json_decode(file_get_contents($ouri), TRUE);
if (!$token) {
echo 'err';
} else {
// что-то
}
?>
<?php echo '<a href="https://oauth.vk.com/authorize?client_id='.ID.'&display=page&redirect_uri='.URI.'&scope=email&response_type=code&v=5.131">Войти</a>'; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question