Viacheslav Bylo
Viacheslav Bylo

Reputation: 11

Is it possible to create a telegram and viber link to a specific chat with a pre filled message?

There are a few conversations on stackoverflow on this subject but solutions from them are not working. For example this one Pre-filled message to a Telegram number

And in the link below it is said that there is no such feature for telegram, but this not entirely true (read below). Open Telegram chat of specific user with text message via browser link

I know that in whatsapp you can do it in this way

whatsapp://send?phone=1234567890&text=Hello%20World

and there is something similar in telegram, so the link looks like this

tg://msg?to=@username&text=Hello%20World

but it works only if I open the link on phone.

And for viber I've tried something like this

viber://forward?text=Hello%20World&recipient=+1234567890

but it doesn't work at all.

1. So, is it possible to create in telegram such link that will work for both pc and phone devices? 2. And is it possible to create similar link for viber?

Upvotes: 0

Views: 565

Answers (1)

ziqq
ziqq

Reputation: 971

First. In your info.plist should contains

<key>LSApplicationQueriesSchemes</key>
  <array>
    <string>whatsapp</string>
    <string>viber</string>
    <string>tg</string>
    <string>itms-beta</string>
    <string>itms</string>
</array>

Second. Your url link should be like this: viber://chat?number=1234567890&draft=Hello%20World

Upvotes: 0

Related Questions