npm.io
1.0.6 • Published 10 years ago

scrape-fb-ogcache

Licence
MIT
Version
1.0.6
Deps
1
Vulns
0
Weekly
0
Stars
1

scrape-fb-ogcache

Build Status Coverage Status

Scrapes open graph cache of Facebook with Node.js

With this package, you can write easily the code to scrape open graph cache of Facebook. On Sharing Debugger of facebook for developers web site, you can request scraping the cache for just one URL. But it is not useful for multi-page web site.

Installation

npm install --save scrape-fb-ogcache

Usage

// example with es2015
const scrape = require('scrape-fb-ogcache');
const token = <PUT YOUR APP TOKEN OF FACEBOOK>;
scrape(url, token, (res) => {
  if (res.error) {
    console.log(`[${total - sitemap.urlset.url.length} / ${total} : FAILED]`, url, res);
  } else {
    console.log(`[${total - sitemap.urlset.url.length} / ${total} : SUCCESS]`, url);
  }
});

Keywords