Skip to content

Instantly share code, notes, and snippets.

@joeangel
Last active October 23, 2015 08:14
Show Gist options
  • Save joeangel/1975b4b302aadbbfe399 to your computer and use it in GitHub Desktop.
Save joeangel/1975b4b302aadbbfe399 to your computer and use it in GitHub Desktop.
[Node.js][Promise] fetch og from url
// Install og
// > npm install open-graph --save
//
// Run for test in node
// > var og = require('./og');
// > og('https://www.fanily.tw/post/11e568b9cef90de19e1542010af01a54').then(function(data){console.log(data)}).catch(function(e) {console.log(e)});
module.exports = require('bluebird').promisify(require('open-graph'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment