0

I have the exporting feature set up and it works great for a user of the site, but I've no idea how I could make it work with the <meta> og:image tag? Can someone point me in the right direction? I've checked the documentation and couldn't find anything useful there, I sense maybe it's not possible?

Thanks

Codemonkey
  • 4,455
  • 5
  • 44
  • 76

1 Answers1

0

Did you try to use similar structure inside <head> tags:

<meta property="og:url" content="your_page" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Some title" />
<meta property="og:description" content="Some description" />
<meta property="og:image" content=".../chart.png" />

If you want image of a chart placed on a page to represent this page, you can export it and save it earlier and use it as a content for an og:image property. There are couple of pages worth seeing regarding this topic, like: http://ogp.me/, https://developers.facebook.com/docs/sharing/webmasters#testing. Also, here: https://developers.facebook.com/tools/debug/ you can see how your markup appears to the Facebook Crawler.

pawel_d
  • 3,061
  • 1
  • 8
  • 13
  • the question is how do I automatically export the chart (which is dynamic and different all the time) to use as chart.png in your code – Codemonkey Aug 02 '17 at 07:28
  • Sorry for the late reply. As I mentioned in my answer you can export image (for example on load event or on each chart update), save it somewhere on a server and then use it. The answer how to do it can be found for example here: https://stackoverflow.com/questions/8802528/how-to-save-an-image-of-the-chart-on-the-server-with-highcharts. – pawel_d Aug 22 '17 at 18:26