D
D
Dima Pautov2019-07-24 16:03:10
Classmates
Dima Pautov, 2019-07-24 16:03:10

Why is there an instant redirect to the connect.ok.ru page when OKSDK.init is initialized?

Good evening guys! Help deal with this scourge!
I will make sharing posts in the social. networks, it came to classmates
I went to the dock, I use the function

OKSDK.init({
        app_id: 'тут мой id приложения',
        app_key: 'Тут ключ',
      })

After it, by clicking on the button, I call
OKSDK.Widgets.post(null, {
        popup: 'on',
        silent: 'off',
        attachment: JSON.stringify(params), // Данные для поста
      })

In theory, after clicking on the button, a window should appear on top of the site with sharing, but the problem is that OKSDK.init, as soon as it starts, immediately redirects me to the connect.ok.ru page .......
For the 2nd day I have been trying to find any information, but all to no avail!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2017-11-09
@viktorulyushev

You are trying to find neighbors for elements .q- and they are not neighbors to each other, since each has a separate parent element .trigger. So replace with . In general, you can do it much easier:$(this).siblings()$(this).parent().siblings()

const $q = $('.trigger .q').click(function() {
  $q.not(this).next().slideUp();
  $(this).next().slideToggle();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question