[SOLVED] Telegram Widget

Answered
0
0

Hi.

What´s the best way to embend a Telegram widget inside a WiseJ app ?

Here´s the Telegram widget link : https://core.telegram.org/widgets/posts

Here´s the Embending code :

<script async src=”https://telegram.org/js/telegram-widget.js?5″ data-telegram-post=”telegram/83″ data-width=”100%” data-userpic=”true”></script>

 

Regards

Marcelo Blank

 

 

 

Attachment
  • You must to post comments
Best Answer
0
0

Drop a Wisej.Web.Widget on a page, size it big enough, then click on the InitScript and use this:

 

this.init = function(options) {

    var script = document.createElement("script");
    script.src = "https://telegram.org/js/telegram-widget.js?5";
    script.setAttribute("data-telegram-post", "telegram/83");
    script.setAttribute("data-width", "100%");
    script.setAttribute("data-userpic", "true");
    this.container.appendChild(script);
    
}

You can't use the string you posted because browser do not execute scripts added after the page is loaded.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.