Answer the question
In order to leave comments, you need to log in
Why does the VKontakte authorization API not work?
I do everything according to the instructions https://vk.com/dev/auth_sites
I get an error
{"error":"invalid_request","error_description":"redirect_uri has wrong domain, check application settings"}
<?php
$link = '<a href="https://oauth.vk.com/authorize?client_id=5580872&display=page&redirect_uri=http://oauth/callback&scope=friends&response_type=code&v=5.92">тык</a>';
if(!empty($_GET['code'])) {
echo '<pre>';
print_r($_GET['code']);
echo '</pre>';
echo '<a href="https://oauth.vk.com/access_token?client_id=5580872&client_secret=7FZtz377OtcKydMd7IoL&redirect_uri=http://oauth&code='. $_GET['code'] .'">тык</a>';
}
echo $link;
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