Is there a way / method to find out the ID of the VK user who opened the page on my site? It is desirable without installing any applications.

I do not know the exact algorithm of work, but often, if you go to different sites, it is possible to comment - that is, ID is somehow read on them?

    3 answers 3

    Not. The site will not know about id, because the user did not give consent to "introduce himself to this site." He can only do this explicitly. In theory.

    In practice, sometimes there are various schemes that trick users into logging in via VC (the user may not even be aware of this) and thus provide the site with a profile id. For obvious reasons, I will not consider the details of such schemes. Among web developers, they are considered as vulnerabilities, the VC administration knows about them.

    The standard form of VC comments does not interact with the server part of the site at all. You can check for yourself by putting it on a static page and publishing it. "Identification" is carried out by the client browser, requesting a comment form from VK domains. In fact, this is the opening of the VK page through the frame, and the Same Origin Policy in browsers will not give you access to the information in this frame.

      You can, for example, set the button, by clicking on which you will receive the user id . A similar question was asked in this topic .

      As for illegal methods, there was a small article on Habré and also on Habré , Yandex also contributed.

        Id users Vkontakte, as a rule, get through api Vkontakte. Maybe this link will help solve the problem? https://vk.com/dev/openapi