Answer the question
In order to leave comments, you need to log in
VK API how to parse response in PHP?
Good day. So it came to the VK API, using cUrl I make a request
$response=json_decode(curl("https://oauth.vk.com/access_token?client_id=".APP_ID."&client_secret=".SECRET_KEY."&redirect_uri=адрес_тут&code=".$_GET["code"]));
$array=array(array) $object
и
json_decode(json_encode($response))
Answer the question
In order to leave comments, you need to log in
$result = json_decode($response);
$token = $result->access_token; // access_token
$experies = $result->expires_in // expires_in
Ну и т.д.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question