HTML Viber link to specific number

天大地大妈咪最大 提交于 2019-12-09 17:53:55

问题


I need help to implement Viber number in my application. It should connect user directly with Viber chat option and it should add specific number where message need to be send. Is it possible to do this through HTML? What could be other way?


回答1:


To open viber chat with a user:

<a href="viber://chat/?number=%2BPHONENUMBERWITHCOUNTRYCODE">Viber Chat</a>

*IMPORTANT! the number should be with "%2B" instead of "+".

You can also open Viber contact, so a user will be able to choose call or chat.

EDIT: Looks like contact link stopped working on February 2019. Chat link still works

<a href="viber://contact?number=%2BPHONENUMBERWITHCOUNTRYCODE">Viber Contact</a>



回答2:


You can add number:

<a href="viber://add?number=12345678">Viber</a>

or you can chat to:

<a href="viber://chat?number=12345678">Viber</a>

or you can send message to channel:

<a href="viber://pa?chatURI=[public account URI]&text=[message text]"> some text </a>


来源:https://stackoverflow.com/questions/31339574/html-viber-link-to-specific-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!