
If an optional options object is supplied with a list of elements, those elements are rendered into share buttons.So the easy bit is to describe how you would add something to the app launcher and that is by way of the Teams Admin Centre > Setup Policies and assuming you don't have anything beyond the default policies, you can probably just get away with modifying the Global Policy. Options (optional): Ĭurrently, all share buttons are rendered on the page.

Maximum number of characters is 200.ĭefault text to be inserted in the assignments "Title" field. Maximum number of characters is 200.ĭefault text to be inserted in the assignments "Instructions" field. The size in pixels of the Share to Teams button to render.ĭefault text to be inserted before the link in the message compose box. Whether or not to show a preview of the content to share. The following image displays Share to Teams for education: Share to Teams for Educationįor teachers using the Share to Teams button, there's an additional option to Create an Assignment that enables you to quickly create an assignment in the chosen Team, based on the shared link. You can use either the HTML default versions or the Open Graph version. The following table outlines the necessary tags: Value If it requires authentication, you can share it, but the preview isn't created.

When your website is shared to Teams, the card that is inserted into the selected channel contains a preview of your website. If your page dynamically renders content, you can use the shareToMicrosoftTeams.renderButtons() method to force Share to render at the appropriate place in the pipeline. To display a message of your choice in compose box, you can define your text in data-msg-text attribute.

If the shared link requires user authentication, and the URL preview from your link to be shared doesn't render well in Teams, then you can disable the URL preview by adding the data-preview attribute set to false. The following image shows the Share to Teams icon:Īlternatively, if you want a different icon size for the Share to Teams button, use the data-icon-px-size attribute. ">Īfter completing this, the Teams icon gets added to your website. Īdd an HTML element on your webpage with the teams-share-button class attribute and the link to share in the data-href attribute. Add the launcher.js script on your webpage.
