1.0.6 • Published 8 years ago

scrape-fb-ogcache v1.0.6

Weekly downloads
40
License
MIT
Repository
github
Last release
8 years ago

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);
  }
});