You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegram for Android, Telegram for iOS, Telegram Desktop
Describe the Bug
shareURL method creates link in the next format:
https://t.me/share?url=<url>
Which should trigger share modal in the app according to official documentation of the Share links API. The thing is - this format works correctly only if link was opened outside of the telegram app, for example this link:
Will show share modal after redirecting to the app if was clicked in the web environment. But if you copy this exact link to the Telegram app and send it - the same link will give the next error (tested on Windows Desktop, iOS and Android app):
Username @share not found
This is probably happening because Telegram thinks that t.me/share is actual link to the user with "@share" username, when link in such format used in the Telegram application
The same problem happened when I tried to use shareURL method inside my Telegram Mini App. I got error that user was not found
To make link work you actually need to use this format:
https://t.me/share/url?url=<url>
With the additional /url part. Links in this format behaves correctly, you can check it out both inside and outside of the Telegram app:
We found it not really long time ago. The problem is Telegram has 2 formats of sharing links, both of them doesn't work in some specific Telegram applications.
I have rolled out an update with the link changed, check out @tma.js/[email protected]. Not closing the issue until the Telegram team fixes the problem on their side.
Telegram Application
Telegram for Android, Telegram for iOS, Telegram Desktop
Describe the Bug
shareURL
method creates link in the next format:Which should trigger share modal in the app according to official documentation of the Share links API. The thing is - this format works correctly only if link was opened outside of the telegram app, for example this link:
https://t.me/share?url=google.com
Will show share modal after redirecting to the app if was clicked in the web environment. But if you copy this exact link to the Telegram app and send it - the same link will give the next error (tested on Windows Desktop, iOS and Android app):
This is probably happening because Telegram thinks that t.me/share is actual link to the user with "@share" username, when link in such format used in the Telegram application
The same problem happened when I tried to use
shareURL
method inside my Telegram Mini App. I got error that user was not foundTo make link work you actually need to use this format:
With the additional
/url
part. Links in this format behaves correctly, you can check it out both inside and outside of the Telegram app:https://t.me/share/url?url=google.com
P.S.
Links, that use
tg://msg_url
variation of links which are also described in docs and looks like this:Work as expected, but it's not possible to use links in this format in Telegram Mini App
To Reproduce
Steps to reproduce the behavior:
utils.shareURL('https://google.com', 'Test message');
Expected Behavior
Opens Telegram app with share modal
The text was updated successfully, but these errors were encountered: