Обучение/Помощь новичкам | Авторизация Вк помогите прописать версию
Переменная $v для чего?
shadrvlad (04.03.2018 в 20:53)
Diskaweri ,
Diskaweri ,
Я сделал так не работает... Могу 20 руб с яндекс деньги скинут за помощь
Nikola_Flamel (04.03.2018 в 20:54)
Переменная $v для чего?
Переменная $v для чего?
Я сам её туда запихнул... Думал получится
Diskaweri (04.03.2018 в 20:55)
shadrvlad (04.03.2018 в 20:53)
Diskaweri ,
Я сделал так не работает... Могу 20 руб с яндекс деньги скинут за помощь
shadrvlad (04.03.2018 в 20:53)
Diskaweri ,
Я сделал так не работает... Могу 20 руб с яндекс деньги скинут за помощь
Ты ХХ сменил на нужную версию?
Diskaweri , $params = array('client_id' => $client_id,'client_secret' => $client_secret,'code' => $_GET['code'],'redirect_uri' => $redirect_uri,'v' => '5.73');
RezzidenT , поменял
<?php
include_once '../sys/core/start.php';
include_once '../sys/core/compress.php';
include_once '../sys/core/sess.php';
include_once '../sys/core/home.php';
include_once '../sys/core/settings.php';
include_once '../sys/core/db_connect.php';
include_once '../sys/core/ipua.php';
include_once '../sys/core/fnc.php';
include_once '../sys/core/shif.php';
include_once '../sys/core/user.php';
include_once '../sys/inc/fnc_game.php';
$url = 'http://oauth.vk.com/authorize';
$v = '5.60';
$params = array('client_id' => $client_id, 'redirect_uri' => $redirect_uri, 'response_type' => 'code', 'v' => '5.60' );
if (isset($_GET['code'])) {
$result = false;
$params = array('client_id' => $client_id,'client_secret' => $client_secret,'code' => $_GET['code'],'redirect_uri' => $redirect_uri, 'v' => '5.60');
$token = json_decode(file_get_contents('https://oauth.vk.com/access_token?client_id='.$client_id.'&client_secret='.$client_secret.'&code='.$_GET['code'].'&redirect_uri='.$redirect_uri.'&v='.$v), true);
if (isset($token['access_token'])) {
$params = array('uids' => $token['user_id'],'fields' => 'uid,first_name,last_name,screen_name,sex,bdate,photo_50','access_token' => $token['access_token']);
$userInfo = json_decode(file_get_contents('https://api.vk.com/method/users.get?uids='.$token['user_id'].'&fields=uid,first_name,last_name,screen_name,sex,bdate,photo_50&access_token='.$token['access_token']), true);
if (isset($userInfo['response'][0]['uid'])) {
$userInfo = $userInfo['response'][0];
$result = true;
}
<?php
include_once '../sys/core/start.php';
include_once '../sys/core/compress.php';
include_once '../sys/core/sess.php';
include_once '../sys/core/home.php';
include_once '../sys/core/settings.php';
include_once '../sys/core/db_connect.php';
include_once '../sys/core/ipua.php';
include_once '../sys/core/fnc.php';
include_once '../sys/core/shif.php';
include_once '../sys/core/user.php';
include_once '../sys/inc/fnc_game.php';
$url = 'http://oauth.vk.com/authorize';
$v = '5.60';
$params = array('client_id' => $client_id, 'redirect_uri' => $redirect_uri, 'response_type' => 'code', 'v' => '5.60' );
if (isset($_GET['code'])) {
$result = false;
$params = array('client_id' => $client_id,'client_secret' => $client_secret,'code' => $_GET['code'],'redirect_uri' => $redirect_uri, 'v' => '5.60');
$token = json_decode(file_get_contents('https://oauth.vk.com/access_token?client_id='.$client_id.'&client_secret='.$client_secret.'&code='.$_GET['code'].'&redirect_uri='.$redirect_uri.'&v='.$v), true);
if (isset($token['access_token'])) {
$params = array('uids' => $token['user_id'],'fields' => 'uid,first_name,last_name,screen_name,sex,bdate,photo_50','access_token' => $token['access_token']);
$userInfo = json_decode(file_get_contents('https://api.vk.com/method/users.get?uids='.$token['user_id'].'&fields=uid,first_name,last_name,screen_name,sex,bdate,photo_50&access_token='.$token['access_token']), true);
if (isset($userInfo['response'][0]['uid'])) {
$userInfo = $userInfo['response'][0];
$result = true;
}
делай авторизацию через ulogin
Стр.: 1, 2