const urlOpenGraph = require('request-url-open-graph');
urlOpenGraph({url: 'http://bit.ly/2gR95sb'}, (oError, oTags) => {
console.log(oTags)
});
const urlOpenGraph = require('request-url-open-graph');
urlOpenGraph({contentHTML: '<html>...</html>'}, (oError, oTags) => {
console.log(oTags)
});
You can view Open Graph without leaving the terminal.
{
"description": "I remember when I, a few months ago, needed to learn how to write JavaScript web applications using Express, NodeJS and PostgreSQL as my...",
"card": "summary_large_image",
"site": "@scotch_io",
"creator": "",
"title": "Getting Started with Node, Express and Postgres Using Sequelize",
"url": "https://scotch.io/tutorials/getting-started-with-node-express-and-postgres-using-sequelize",
"type": "article",
"image": [
{
"url": "https://scotch.io/wp-content/uploads/2016/12/nrMHOlRR6imGBoKkDZLJ_getting-started-with-node-express-postgres-sequelize.png.jpg"
}
]
}