G
G
George2012-04-22 16:11:26
JavaScript
George, 2012-04-22 16:11:26

Using data received via VK Api?

I am using open API. Everything I need is working, but there is one very strange bug. In the Permission to access user data window that appears, even if you click the Cancel button (and not Allow), the data is transferred.
Here is the code:

VK.init({<br>
    apiId: 2903251<br>
  });<br>
function getit(response) {<br>
  if (response.session) {<br>
    var id = response.session.mid;<br>
  }<br>
  VK.Api.call('users.get', {uids: id, fields: 'sex,photo_big'}, function(r) {<br>
    if(r.response) {<br>
      $.post ('vkadd.php', r.response[0], function(rp){<br>
        /*Функция обработки ответа*/<br>
      });<br>
    }<br>
  });<br>
}<br>

Here is a video demo .
Where is the logic? Don't know.
I ask you for help.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2012-04-23
@seriyPS

Assumption, I didn’t check it myself:
It seems like VK changed the policy of accessing public data through the API - what is already available on the user’s page can be obtained using the API without confirmation. If you try to request access to non-public data (wall / private messages / friends list) then everything will work as expected.
PS: your code is terrible...

V
Vitaliy Petrychuk, 2012-04-22
@vermilion1

You should report this bug to support.

Y
Yuri Popov, 2012-04-22
@DjPhoeniX

I myself faced such a problem. Maybe it’s worth trolling to kick support with all the habr , and then the bug will be fixed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question