<metaproperty="description"content="A Telegram Sharing Button is an easy way to let users forward content from your website or app to their friends, Channels…">
<metaproperty="og:description"content="A Telegram Sharing Button is an easy way to let users forward content from your website or app to their friends, Channels…">
<divid="dev_page_content"><p>A Telegram <strong>Sharing Button</strong> is an easy way to let users forward content from your website or app to their <strong>friends</strong>, <ahref="https://telegram.org/tour/channels"><strong>Channels</strong></a> or <ahref="https://telegram.org/blog/albums-saved-messages#saved-messages"><strong>Saved Messages</strong></a> on Telegram.</p>
<p>When a user presses the button, Telegram asks them to choose a chat, group or channel where your link will be shared. You can also add some text that describes the link – the user will be able to edit it before sending the message. </p>
<p>Check out posts on the <ahref="https://telegram.org/blog">Telegram Blog</a> for working examples of sharing buttons.</p>
</blockquote>
<h3><aclass="anchor"name="adding-telegram-sharing-buttons-to-your-website"href="#adding-telegram-sharing-buttons-to-your-website"><iclass="anchor-icon"></i></a>Adding Telegram sharing buttons to your website</h3>
<labelclass="col-md-3 control-label">URL to Share:</label>
<divclass="col-md-6">
<divclass="textfield-item">
<inputid="share_url"name="share_url"type="text"class="form-control"placeholder="Page link, e.g. https://telegram.org/"onchange="updateWidget()"onblur="updateWidget()">
<inputid="share_comment"name="share_comment"type="text"class="form-control"placeholder="Check this out!"onchange="updateWidget()"onblur="updateWidget()">
<p>where <code>{url}</code> is the URL the user will be sharing and <code>{text}</code> is an optional description that will be included with the link. Both values should be <ahref="https://en.wikipedia.org/wiki/Percent-encoding">URL-encoded</a>.</p>
<p>Here is a sample code for PHP:</p>
<pre><code>/**
* @param string $url Absolute URL to share, e.g. "https://example.com/path/to/article?with=params"
* @param string $text Optional comment to share URL with, e.g. "Check out this article!"
* @return string Button HTML markup, feel free to modify to your taste
*/
function telegramForwardButton($url, $text = '') {
<p>You are welcome to use the <ahref="https://telegram.org/press#telegram-logos">Telegram Logos</a> in your custom button design.</p>
<h4><aclass="anchor"name="integrations-and-libraries"href="#integrations-and-libraries"><iclass="anchor-icon"></i></a>Integrations and libraries</h4>
<ul>
<li><ahref="https://en.blog.wordpress.com/2016/04/13/new-on-wordpress-com-sharing-buttons-for-whatsapp-telegram-and-skype/">Sharing buttons on WordPress.com blogs</a></li>
<p>If you have a library, plugin or integration script for Telegram sharing buttons, please contact <ahref="https://t.me/botsupport">@BotSupport</a> and we'll add you to this list.</p>
</div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.