Im trying to make links to telegram or viber from my wix page.
Im trying to do that through wix code because web interface link validator said that link is wrong(screenshot)
I have tried to use wixcode for that:
import wixLocation from ‘wix-location’;
$w.onReady(function () {
//TODO: write your page related code here…
$w(“#image3”).onClick(wixLocation.to(“viber://add?number=120345678910”));
});
And i have got the next errors:
Wix code SDK error: The onClick parameter that is passed to the onClick method cannot be set to the value viber://add?number=120345678910. It must be of type function.
Wix code SDK error: viber://add?number=120345678910 is an unsupported url
Wix code SDK error: The onClick parameter that is passed to the onClick method cannot be set to the value [object Object]. It must be of type function.
Can anyone help to find a way to make links to viber and telegram?
Thank you for your response.
It is not page link. It is link to open application on client side with specific parameters(telephone number).
REST API will not help with that because the purpose of that link to open application (telegram or viber) on client side.
It is the same as callto: or mailto: but for another applications
it is easily can be done with pure html or javascript but i dont know how to use pure html or javascript on wix pages.
Hi,
I found this example of Whatsapp application here . It seems like it’s a similar scenario with Telegram and Viber. You should check out their documentation.