Nathan

Nathan

Nathan Zorn  //  Surfer and software developer.
http://github.com/thepug

Aug 30 / 10:46am

An XMPP HOWTO: Tape, Collecta, and the Eye

This HOWTO describes the steps to setup a simple web server/proxy, and to use the Collecta XMPP API to display images from a Collecta search.  From these steps it should be clear what components are needed to start writing your own web based XMPP/Collecta application. You will need to know some basics about web development and how to use git to download code. See http://metajack.im for more information about Strophe and Tape.

 

First you will need a simple http server and proxy.  Tape, http://github.com/metajack/tape, was written just for this purpose. Download tape from the git repository, git clone http://github.com/metajack/tape.git, and copy the script to a directory in your path.  Mine is located at /usr/local/bin/tape. 

Second you will need The Compound Eye and all of its requirements. Download the compound eye, git clone http://github.com/collecta/compoundeye.git. This will create a directory called compoundeye.  Next you will need Strophejs and the Collecta XMPP API plug-in for Strophe.  Retrieve these libraries with git clone http://github.com/metajack/strophejs.git and git clone http://github.com/collecta/strophejscollecta.git.  After retrieving strophe and the plug-in, build strophe by changing to the strophejs directory and running the make command.  You will need the YUI compressor for this step, http://developer.yahoo.com/yui/compressor/.  Finally you will changed to the compoundeye directory and copy in the dependencies. Copy strophe.min.js from strophejs and strophe.collecta.js from the plug-in project.

Now you should be ready to run the demo. Change to the compoundeye directory and run tape. tape -P /xmpp-httpbind=http://collecta.com/xmpp-httpbind -P/http-pre-bind=http://collecta.com/http-pre-bind 

This will start up tape and proxy to collecta.com for the needed BOSH urls.  Now browse to your demo at http://localhost:8273/.

Note that this uses a demo API key.  To increase your number of results you can request a key at api@collecta.com

 

This demo was used in the Charleston Pecha Kucha presentations.