Answer the question
In order to leave comments, you need to log in
How to get data about the VK page through a JS script on an external site?
With these magic lines:
<script src="https://vk.com/js/api/xd_connection.js?2" ></script>
<script>window.name='fXD';
VK.init(function() {
// API initialization succeeded
// Your code here
console.log('API is working!\n\n')
}, function() {
// API initialization failed
// Can reload page here
console.log('API is not working...')
}, '5.124');</script>
VK.api("users.get",{"user_ids": "durov", "fields":"city", "v":"5.89"},function(data){
console.log(data);
})
Answer the question
In order to leave comments, you need to log in
Without authorization, the API cannot be used anywhere. These are basic concepts. Without authorization - only parsing.
Authorization is precisely for this purpose made in order not to allow such cunning people like you to make anonymous requests to api and to be able to disconnect you from the service at any time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question