Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

twitter-inline-oembed

0.0.1 • Public • Published

twitter-inline-oembed

Easily embed Tweets inline in your web pages.

No fussing around with oembed, CMS modding and whatnot.

Usage

  • Add oembed.js to your project
npm install twitter-inline-oembed
  • Use the following format anywhere you want a Tweet embedded
<script src="/path/to/oembed.js?tweet=https://twitter.com/dietrich/status/834597640411152384"></script>

The Tweet will be embedded in your page, right where you put the <script> tag.

Voila.

TODO

Known Issues

  • Sometimes some or all of the Tweets are not styled, sometimes not even rendered. I don't know why yet.

  • I haven't yet found a way to stop Twitter's widget.js file from being included per-embbeded-tweet while also having the widgets rendered correctly. This means that there are multiple redundant network requests for that file :(

install

npm i twitter-inline-oembed

Downloadsweekly downloads

2

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability