Recently while working on a hackathon, I came across Slack's link unfurling feature. I saw the following screenshot that depicted you can now really customize how the url is unfurled.
![]() |
An imaginary unfurl for api.slack.com |
Previously I had seen the following unfurling that Slack does by reading oEmbed code, Twitter card tags, Facebook open graph tags and HTML meta tags on the page:
![]() |
Anatomy of an unfurl |
While trying to figure out how to code the custom unfurling, I tried to find examples and guides out there that would take me step-by-step through the process, while there were some, none were really clear on the steps and conditions. So I decided to write one up myself, my very first public repository: Slack-link-unfurling
I went through each step detailing what needs to be set so that you can customize the link unfurling via link_shared event fired by Slack. Albeit I used Botkit framework which has the overhead of need a bot setup to fire things properly, overall it was a much quicker process for me to spin this up.
Hopefully someone finds this useful and is able to get link unfurling in Slack done quicker!
No comments :
Post a Comment