Answer the question
In order to leave comments, you need to log in
Different urls for the VKontakte application?
Hello, there was a need to create a VKontakte application based on an online store showcase. Created via iframe, everything works. Tell me, is it possible to create applications on the fly? Or pass some parameters. The task is that a person can bring a section with a certain category of goods into an application, for example, the "bicycles" application, which loads site.com/velosipedi through an iframe, and another user wants to put the "refrigerators" section on VKontakte, and in this case iframe needs to be loaded site.com/holodilniki.
Is it possible to somehow use one application and dynamically load the url there? Or maybe create an application on the fly? Thank you.
Answer the question
In order to leave comments, you need to log in
I assume that adding a hash to the link to the application will solve your problem. For example, if you want to show the user exactly refrigerators, then you should edit the link like this: vk.com/app123456#holodilniki
.
In this case, when the application starts, a GET parameter will be sent hash
, which will contain everything after the # sign in the application link. Here are all the parameters that are passed to the application at the first start.
If you want to pass several parameters to the application, then you will not find any "convenient" way. The only way is to pass additional parameters in the same hash, for example vk.com/app123456#holodilniki-page1
, and then parse this parameter on the server or client side.
Please note that the array of data provided in the documentation link above is sent only once when the application starts. If the user clicks on some internal link inside your application, then these parameters will not be sent again.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question