Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gjgd/open-graph-preview-demo

The purpose of this project is to show how to use open graph annotations to have a rich preview of a link in Slack (or other websites)
https://github.com/gjgd/open-graph-preview-demo

lambda open-graph serverless slack

Last synced: 8 days ago
JSON representation

The purpose of this project is to show how to use open graph annotations to have a rich preview of a link in Slack (or other websites)

Awesome Lists containing this project

README

        

# open-graph-preview-demo

## Install

Install `serverless` (and its alias `sls`)

```bash
npm i -g serverless
```

To deploy:

```bash
sls deploy
```

## Try it:

https://l3mukrh389.execute-api.us-east-1.amazonaws.com/dev/2

If you paste this link in Slack, it will recognize the user agent and return open graph annotation

If you paste this link in a normal browser, it will return a Hello world sentence

## Links

- https://medium.com/slack-developer-blog/everything-you-ever-wanted-to-know-about-unfurling-but-were-afraid-to-ask-or-how-to-make-your-e64b4bb9254
- https://ogp.me/