Why not check out some cool demos that show off what you can do with it?
There are two steps to setting up Magic Lantern on your site. First, include magiclantern.js. (Proper npm/module support is coming.) Then, when the user wants to tweet, call
magiclantern.tweet(). The function takes one argument: an object which must contain two properties:
status, the suggested text of the tweet, and
media, described below. It may also include the properties
possibly_sensitive as described in Twitter's documentation. Because
tweet() opens a popup window, it should be called as a direct result of user interaction or many browsers will block it.
The tweet object's
media property can be either a media object or (when attaching multiple images) an array of media objects. A media object contains
alt_text, which should be a useful textual description of the media. Accessibility is important!
data can be an HTML canvas element, a blob, a data URL, an HTTP(S) URL, or a promise that resolves to any of those things. Unless you're using a canvas, see Twitter's media upload guide for guidance on formats and file sizes.
To see what this all looks like in practice, check out the demos.
Magic Lantern is fully functional, but there's still work to be done:
Magic Lantern works in modern browsers and doesn't work in older versions of IE, but I still need to map out the exact borders and add shims where appropriate.
I've been told that some people use this other social network, and would like to share things there too.
Magic Lantern is made by Daniel McLaughlin. If you have questions, or if you're using it to make something cool, say hi on Twitter!