Advertisement
Guest User

Untitled

a guest
Dec 20th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.61 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title>Test</title>
  4.     <!--<link type="text/css" rel='stylesheet' href='1.css'/>
  5.    <script src="jquery-2.0.3.min.js"></script>-->
  6. </head>
  7. <body>
  8. <script src="https://vk.com/js/api/openapi.js" type="text/javascript"></script>
  9.  
  10. <div id="login_button" onclick="VK.Auth.login(authInfo);"></div>
  11.  
  12. <script language="javascript">
  13. VK.init({
  14.   apiId: 5785736
  15. });
  16. function authInfo(response) {
  17.   if (response.session) {
  18.     alert('user: '+response.session.mid);
  19.   } else {
  20.     alert('not auth');
  21.   }
  22. }
  23. VK.Auth.getLoginStatus(authInfo);
  24. VK.UI.button('login_button');
  25. </script>
  26.  
  27. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement