Show specific user page in Telegram

I am creating a phonegap application and I want to open Telegram groups or channels from my application.

In another meaning, when I click on a group, Telegram opens, and this group is displayed to the user.

I used the following code, but I don’t know how to switch to specific @username Page:

  var username = 'http://telegram.me/telegram'; navigator.startApp.start("org.telegram.messenger", function(message) { /* success */ console.log(message); // => OK }, function(error) { /* error */ console.log(error); }); 

I tried to do this by opening tg:resolve?domain=username in the browser, but my browser gave me erro:

net::ERR_UNKNOWN_URL_SCHEME

+5
source share
1 answer

The answer is simple. Telegram links follow her: https://t.me/

So, if the group is a public supergroup and has a public username (e.g. @newchat), you can link to it via this link (e.g. t.me/newschat)

0
source

Source: https://habr.com/ru/post/1242440/


All Articles