Answer the question
In order to leave comments, you need to log in
How to connect VK Bridge and send a VKWebAppInit event for a site?
Hello!
Can you please tell me how to connect VK Bridge correctly and send the VKWebAppInit event for the site?
Problem:
An application created in VK does not open on mobile devices.
This is what the TP replied:
You need to connect VK Bridge and send a VKWebAppInit event: https://vk.com/dev/vk_bridge_events?f=Initializing VK Bridge .
Without it, the application in mobile clients may not work / open the second time.
Answer the question
In order to leave comments, you need to log in
import bridge from '@vkontakte/vk-bridge';
bridge.send('VKWebAppInit', {});
// чтобы ловить события в консоль:
bridge.subscribe((e) => {
console.log('bridge event', e);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question