knowledge/Open Graph Protocol.md
Marco D'Agostini 95782bbca6 Added missing tag header to some documents
Added `english` / `spanish` tags and added `english` tag to template
2021-02-24 17:10:55 +01:00

34 lines
923 B
Markdown

---
tags: knowledge, web, protocol, english
---
# Open Graph Protocol
This is a standard that uses websites to tell external websites how a link preview should look
Works by defining `<meta/>` tags like `<meta property="og:{}" content="{}" />`
## Example
```html
<html prefix="og: https://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="https://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="https://ia.media-imdb.com/images/rock.jpg" />
...
</head>
...
</html>
```
## Further reading
- [Official documentation](https://ogp.me/)
## What led to learning this
I Linked to [Bolivar Paralelo](https://bolivarparalelo.com/) in my [LinkedIn](https://www.linkedin.com/in/madacol/) and the preview was garbage