The TwitPic object provides read-only access in the browser, and full access (including photo uploads) in NodeJS, to the TwitPic API.
This library is no longer dependent on jQuery, and is now written in Coffeescript.
The NodeJS version has support for write-enabled API methods using OAuth Echo (requires node-oauth library).
Install with npm
npm install twitpic
Simply include lib/twitpic.min.js (or the full version) in a script tag on your webpage to load the TwitPic API library.
There are two separate ways you can query the API:
var tp = ;tpmedia;
var TwitPic = TwitPic;var tp = ;tpusers;
var TwitPic = TwitPic;TwitPic;
Write-Enabled API Query
Note that this assumes you already have all of the required credentials before making this call.
var TwitPic = TwitPic;// Must create a TwitPic object for write-enabled methodsvar tp = ;// Configure the TwitPic object with our credentialstp;// Post a comment on twitpic.com/abc123tpcomments;// Upload a photo and post a tweettp;
See the official TwitPic API docs for more information. Otherwise, here's a quick list of all the available API endpoints: