Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Link previews in Slack and MS Teams for Confluence pages?

When I paste links from our company Confluence Data Center site (uses SSO) into Microsoft Teams or Slack, there's no nice link preview ("unfurl" in Slack terms) with a page title and description.  I spent a couple of hours figuring out how to add Facebook's commonly used "og" meta tags to the Velocity template, but the link previews don't work.  I finally realized this is probably due to authentication:  Teams/Slack cannot fetch the content without some credentials, either mine or something baked into Teams.  

Is there some clever way around this?  BTW if it helps anyone, here's code I added to the Main Layout in Confluence.  I did not find, frankly, any useful docs on how to reference specific properties and did a lot of trial and error.  The URL bit isn't right but I'm stuck anyway ... 


 ## BEGIN LINK PREVIEW TAGS
<meta property="og:type" content="website" />
<meta property="og:url" content="$req.getServerName()" />
<meta property="og:title" content="$sitemeshPage.getProperty("title")" />
<meta property="og:description" content="$sitemeshPage.getProperty("title")" />
<meta property="og:image" content="$req.getServerName()$spaceManager.getLogoForGlobalcontext().getDownloadPath() " />
## END LINK PREVIEW TAGS  

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

193 views 6 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you