A
A
AlexVedmak2015-09-21 01:52:36
Java
AlexVedmak, 2015-09-21 01:52:36

How to log in to VKontakte using java?

Good afternoon. I'm trying to log in to VK using HttpUrlConnection , but it doesn't work. There are ready-made examples on the Internet, but they are already outdated. If you look at the authorization page code, you can find out that in the post-request, in addition to " https://login.vk.com/?act=login&soft=1&utf8=1 ", you need to pass _origin, ip_h, lg_h, to, email and pass. I send it, but it always redirects me to a page with the text "Invalid username or password". Login and password are correct. Who knows how to log in correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexVedmak, 2015-09-21
@AlexVedmak

Authorized using the HttpUnit library.

S
sasha, 2015-09-21
@madmages

https://vk.com/dev/authentication
you need to use webview to get the token generated by the link above

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question