Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,486
Community Members
 
Community Events
165
Community Groups

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  

 

1 answer

0 votes
Brant Schroeder Community Leader Jan 27, 2022

@John Price Unfortunately it will only pull the main space image and description and there is no way to adjust this.

Suggest an answer

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

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

1,032 views 18 28
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