If you missed it, today on 06/24/2019 – Microsoft launched the Share To Teams functionality. This allows you to load a .js and easily share content to Teams. Read the blog post here and the technical documentation here.
When you have the ability and permissions to load the js, do it. This is the fasted way. However, not everyone has access to a system where they can ad-hoc add a js file. In my case, this wordpress site does not allow me to load additional js files unless I go up in my subscription. Challenge accepted, how can we achieve the same thing without a js load.
Well, when we look at the url that is being called from the js and when we look at the technical documentation, we see this:
Part 1: https://teams.microsoft.com/share?href=
Part 2: preview=true
Part 3:referrer=
So, we can now reconstruct the url based on these parts. You will have to encode the url but there are tons of websites and tools out there.
The full url for the share button for this article is:
Let’s finish it up with a nice Teams Button, connect the link to it, and done