by bgreenlee » Mon Oct 23, 2023 10:53 pm
We're big fans of APOD at my company, and we have a #space Slack channel where we automatically post a link to APOD every morning. However, the unfurl you get in Slack isn't terribly interesting:
However, Slack will look for
OpenGraph metadata headers in the page and use those if it finds them. I wrote a
little app that uses the NASA APOD API to generate the headers and then automatically redirect to the APOD page. This is what it looks like in Slack:
Ideally, the APOD page could incorporate these headers and this hack wouldn't be necessary. In the meantime, feel free to use my app at
https://astroslack.fly.dev, or create your own API key and host it yourself.
Cheers,
Brad
We're big fans of APOD at my company, and we have a #space Slack channel where we automatically post a link to APOD every morning. However, the unfurl you get in Slack isn't terribly interesting:
[img]https://files.footle.org/images/apod/apod-before.png[/img]
However, Slack will look for [url=https://api.slack.com/reference/messaging/link-unfurling#classic_unfurl]OpenGraph metadata headers[/url] in the page and use those if it finds them. I wrote a [url=https://github.com/bgreenlee/astroslack]little app[/url] that uses the NASA APOD API to generate the headers and then automatically redirect to the APOD page. This is what it looks like in Slack:
[img]https://files.footle.org/images/apod/apod-after.png[/img]
Ideally, the APOD page could incorporate these headers and this hack wouldn't be necessary. In the meantime, feel free to use my app at [url]https://astroslack.fly.dev[/url], or create your own API key and host it yourself.
Cheers,
Brad