I write a small PHP script, post a message to the group / discussion. The problem is this: after logging in via oauth, it gives a token with a redirect to http://oauth.vk.com/blank.html , so I pull it out with my hands (can I pull it out somehow with my hands?). I pulled it out, in the parameters indicated scope=offline , but at the same time the token is reset after the first command is executed, and it cannot be used a second time. What am I doing wrong?
$params = array( 'client_id' => $client_id, 'redirect_uri' => 'http://oauth.vk.com/blank.html', 'response_type' => 'code', 'scope' => 'notify,friends,photos,audio,video,docs,notes,status,offers,questions,wall,groups,messages,notifications,stats,ads,offline' ); http://oauth.vk.com/authorize?'. urldecode(http_build_query($params))
codecomes as$_GET['code']. And after gettingaccess_tokenby this code, check theexpires_inparameter. - user6550