Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augbog/twitter-card
Simple module that appends the proper meta tags for your own custom twitter card
https://github.com/augbog/twitter-card
Last synced: 10 days ago
JSON representation
Simple module that appends the proper meta tags for your own custom twitter card
- Host: GitHub
- URL: https://github.com/augbog/twitter-card
- Owner: augbog
- License: mit
- Created: 2015-01-16T23:04:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-17T00:05:54.000Z (almost 10 years ago)
- Last Synced: 2024-10-17T06:30:51.400Z (21 days ago)
- Language: JavaScript
- Size: 199 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Card
Simple module that appends the proper meta tags for your own custom twitter card# Install
npm install twitter-card --save-dev# Usage
var twitterCard = require('twitter-card.js');
twitterCard({
"type" : "summary|summary-large|photo|image|gallery|player",
"url" : "https://www.evernote.com"
"handle" : "@evernote",
"creator": "@augburto",
"title" : "Tweet Title",
"description" : "Description included in tweet"
"content" : {
"gallery" : {
"images" : ["https://www.image.com/1/"] // up to 4 images
},
"player" : {
"embed" : "https://www.youtube.com/embed/xtG-JbiH-Gc",
"image" : "https://i.ytimg.com/vi/xtG-JbiH-Gc/mqdefault.jpg",
"width" : 350,
"height" : 196
}
}
});# Notes
* Currently `app` is not supported but hoping to add this soon
* Working on adding support to directly validate twitter-card
* Hoping to remove jQuery as a dependency