jssocials icon indicating copy to clipboard operation
jssocials copied to clipboard

Telegram sharing not working

Open alphalamont opened this issue 7 years ago • 1 comments

When sharing a URL with Telegram, it opens only the general chat window - and all URLs and texts are gone.

Tested with web TG app (https://web.telegram.org/#/im), and native Android app.

alphalamont avatar Apr 01 '17 16:04 alphalamont

My decision if someone need it:

//telegram share bug fix setTimeout(() => { //get current url const url = window.location.href; //get current title const title = document.querySelector('.text-box').querySelector('.title').innerText; //set share link to telegram btn document.querySelector('.jssocials-share-telegram').querySelector('a').setAttribute('href', https://telegram.me/share/url?url=${url}&text=${title}); }, 1)

Kullpoint avatar Sep 14 '21 15:09 Kullpoint