GithubHelp home page GithubHelp logo

egg- / ogp-meta Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 4.0 11 KB

Generate open graph meta tags.

License: MIT License

CoffeeScript 21.42% JavaScript 78.58%
ogp-meta opengraph-tags opengraph generator meta

ogp-meta's Introduction

ogp-meta

version download

Generate open graph meta tags.

js-standard-style

Usage

var OpenGraph = require('../')

var ogp = new OpenGraph()

ogp.title('title')
ogp.type('website')
ogp.description('description')
ogp.site_name('site_name')
ogp.url('http://ogp-meta.npm')
ogp.image('http://image url')
// reset
ogp.image(null)
ogp.image({
  url: 'http://image url',
  width: 400,
  height: 400
})
ogp.video('http://video url')
// reset
ogp.video(null)
ogp.video({
  url: 'http://video url',
  width: 1024,
  height: 720
})
ogp.app({
  url: 'example://app',
  app_store_id: 'app_store_id',
  app_name: 'app_name'
}, 'ios')
ogp.app({
  url: 'example://app',
  package: 'com.ogp-meta.app',
  app_name: 'app_name'
}, 'android')

console.log(ogp.toHTML())

LICENSE

ogp-meta is licensed under the MIT license.

ogp-meta's People

Contributors

egg- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ogp-meta's Issues

og:image missing

Like Button Warnings That Should Be Fixed

  • Like Button Tag Missing
    • og:image is missing. The og:image meta tag is necessary for Facebook to render a News Feed story that generates a high click-through rate.

Warnings That Should Be Fixed

  • Inferred Property
    • The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
  • Parser Mismatched Metadata
    • The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: 'og:image:url'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.