<html>
<head>
<script src="//vk.com/js/api/openapi.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<script>
window.onload = (function() {
VK.init({
apiId: 4983778 //ВАШ_IP_ID
});
function authInfo(response)
{
if (response.session)
{
document.getElementById('id').innerHTML = "Your ID: " + response.session.mid;
}
else
{
document.getElementById('id').innerHTML = 'Вы не авторизованы вконтакте.';
}
}
VK.Auth.getLoginStatus(authInfo);
});
</script>
<div id='id'></div>
</body>
</html>