A real-time Spotify & Twtter API mashup.
This web app filters the Twitter stream for #NowPlaying tweets, extracts track IDs from Spotify URLs, requests track data from the Spotify API and plays the audio in the web browser. Implements Twitter status/filter stream and oEmbed API.
Inspired by Serendipity by @kcimc, a Spotify Media Artist in Residence.

Install Node.js.
Clone GitHub repo:
git clone https://github.com/twitterdev/spotatweet.git
Create Twitter and Spotify Apps:
- Create a Twitter application.
- Create a Spotify application.
Create a config.json file using config.sample.json as a template. Fill in your Twitter & Spotify App API Keys.
Install Compass Ruby Gem.
gem install compass
If you do not want Compass support, comment out this line in app.js
// app.use(require('node-compass')({mode: 'compress'}));
Install node module dependencies:
npm install
Run application:
npm start
Go to http://localhost:3000 in your browser.
A GET request to /nowplaying.json will return a Tweet object hydrated with a "spotify_track" object and a "oembed" object of the latest #NowPlaying Tweet.
This application is already configured to run on Heroku and can be deployed with Git.
Before deployment set your Heroku environment config vars to mirror config.json.
On Heroku set NODE_ENV to "production."