scrape-fb-ogcache

1.0.6 • Public • Published

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

Package Sidebar

Install

npm i scrape-fb-ogcache

Weekly Downloads

0

Version

1.0.6

License

MIT

Last publish

Collaborators

  • daisukenakahama