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
@John Price Unfortunately it will only pull the main space image and description and there is no way to adjust this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.