Package Exports
- parse-open-graph
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-open-graph) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-open-graph
Open Graph parser for browser
Usage
const parseOpenGraph = require('parse-open-graph')
const result = parseOpenGraph()
console.log(result)APIs
parseOpenGraph(doc = document)
Parses Open Graph meta tags and returns the parsed object.
Return format:
{
og: {
title: 'Open Graph protocol',
type: 'website',
url: 'http://ogp.me/',
image: {
url: 'http://ogp.me/logo.png',
type: 'image/png',
width: '300',
height: '300',
alt: 'The Open Graph logo'
},
description: 'The Open Graph protocol enables any web page to become a rich object in a social graph.'
},
fb: {
app_id: '115190258555800'
}
}