plotly / dash-labs

Work-in-progress technical previews of potential future Dash features.
MIT License
139 stars 39 forks source link

Meta Tags Bug #98

Closed AnnMarieW closed 2 years ago

AnnMarieW commented 2 years ago

As reported by @raptorbrad on the forum

I believe I may have found a bug with the meta tag information. I’ve been playing around with it quite a bit and I can’t seem to get my links to display as shareable cards on Twitter. I believe there are a few issues with a some of the meta tags set in the interpolate index function that generates the header information.

Based on playing around with meta tags on https://metatags.io/, I’ve found the following:

The twitter:card property tells Twitter the type of card to display, so instead of passing the description in, we should use the following.

<meta property="twitter:card" content="summary_large_image">

More information on Twitter cards can be found at the following url: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards 1

Additionally, the twitter:url is supposed to point to the link you are sharing instead of to https://metatags.io/.

For all the image tags twitter:image and og:image, I believe they need to be absolute paths to where the images are hosted online (i.e. http://www.website.com/assets/image.png instead of relative paths /assets/image.png. The current implementation will always be the image provided appended to /assets/.

AnnMarieW commented 2 years ago

Fixed in V1.0.8