Last active
October 23, 2015 08:14
-
-
Save joeangel/1975b4b302aadbbfe399 to your computer and use it in GitHub Desktop.
[Node.js][Promise] fetch og from url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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