S
S
Shane Matte2016-10-31 11:13:35
JavaScript
Shane Matte, 2016-10-31 11:13:35

How to make requests to VK api without authentication?

Hello. When selecting regions by vk api, if I am authorized, everything is ok. But if I log out, the requests are not sent

VK.init({
    apiId: code_id
  });	
  VK.Api.call('database.getRegions', {country_id: 1}, function(region) {
    var reg = 0;	
    console.log(region);
    for(reg; reg < region.response.length; reg++){
    console.log(region);
    $('select.reg-block-select').append('<option data-title-tegion="'+region.response[reg].title+'" value="'+region.response[reg].region_id+'">'+region.response[reg].title+'</option>');
    }
});

How to make a request so that any person visits the site and sees the information received through the vk api?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WQP, 2016-10-31
@mattedev

Используйте данное API https://vk.com/dev/database.getRegions

I
iBird Rose, 2016-10-31
@iiiBird

Well, maybe create an acc in VK which thread and do authentication through it. and let anyone who visits the site - will work through this acc. I don’t think that working with api you have concerns the user’s personal data or his wall and so on. which means you can easily use one account for everyone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question