Hello!
You need the following: send a request for authorization to VK. Get access_token in the HTML TELE response message. It is in the body that is important. I send a request for authorization as follows:
NetSend("http://oauth.vk.com/authorize?client_id=+++&scope=12&redirect_uri=http://oauth.vk.com/blank.html&v=5.5&response_type=token", Response); Where Response is OnResponse (char * response, int length) {...}.
Parameters - server response and response message length. Everything works ... The answer comes only:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1251" /> <title>OAuth Blank</title> </head> <body> Пожалуйста, <b>не копируйте</b> данные из адресной строки для сторонних сайтов. Таким образом Вы можете <b>потерять доступ</b> к Вашему аккаунту. </body> </html> As you can see, the token is not there, it comes to the browser line (I don’t have functions that could accept the token somehow in a special way. Trouble, I can’t log in. Okay, how I solved the problem:
I get back:
{"access_token":"4f3d15484f3d15484f60a960734f03cb3444f3d4f3d15481c07d11a045de4505f7cf2e3","expires_in":0} Only this access_token does not work, why ???
redirect_urlparameter in the authorization of Standalone applications . Redirect the user to a page on your site (his domain must be registered in the application settings), and there first give your page with JS, which will take the token from the address bar, and then AJAX will post it right there to the script on your site, where you save it. - Sergiks