E
E
EVOSandru62016-09-15 08:05:39
JavaScript
EVOSandru6, 2016-09-15 08:05:39

How to do VK.Auth.logout() in javascript sdk?

Good Morning!
I'm using a confirmation box to send a post by a user to a group.
There was a problem - after adding a post, the user's authorization session needs to die and to resend the post in the confirmation window, a form for a new authorization is needed. I use the following code for logout , but it does not happen( Tell me how to fix this moment.

function vkLogout(){
   VK.Auth.getLoginStatus(function(response){
               if(response.status == 'connected'){
                  VK.Auth.logout(function(response){
                  console.log('Log out VK');
                  document.location.reload();
            });
         }
      });
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question