A Node.js application for auto-messaging all of your matches on OkCupid. This application is the follow up to my previous foray into automated online dating, OkCupid_Match_Messenger (Ruby version).
Unlike its predecessor, which was only a command line Ruby script, Relation Bootstrap has a web based user friendly interface where the user can configure how the application will auto-message others and set filters to specify what type of people the user woud like to message.
A user can filter whom the application will auto-message by the following dimensions:
- Match %
- Friend %
- Enemy %
- Who's New
- Last Online
- Special Blend
- Match % & New
- Match % & Last Online
- Match % & Distance
These can be found at the official Node.js website
Install Homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Install Node.js
brew install node
Install NPM (Node Package Manager)
curl http://npmjs.org/install.sh | sh
If you already have Homebrew installed from the previous step it's as easy as...
brew install mongodb
Install required Node packages individually
npm install express
npm install mongoose
npm install request
npm install jsdom
npm install ejs
npm install stylus
Or install them simultanesouly from those specified in package.json. Within the top level directory of the application run
npm install
At the Mongo cmd line type:
use database_name
Where "database_name" represents whatever you named your database earlier
Specify the MongoDB database you made earlier in okcupid.js
Add your OkCupid username and password where needed in okcupid.js
Spinning up the app's server is as easy as:
node app.js
The application needs an OkCupid authenticity token in order to sucessfully send requests to their servers and receive content back. Unfortunately this is the only step in the entire process that hasn't been automated yet.
My method for obtaining said auth token is as follows:
Go to OkCupid.com in a browser capable of viewing the HTTP requests going in and out (I found Firefox / Firebug best for this process).
Send a message to anyone on the site and inspect the POST request to http://www.okcupid.com/mailbox to find the Form Date, which looks like this:
Form Data (url encoded)
ajax:1 sendmsg:1 r1:okaycupidgrl subject: body:hey! threadid:0 authcode:1%2C0%2C1339917833%2C0x3c555cf6c4f6d5af%3Bb16d35ec40883e324e28d4fed05cce9799216a6b reply:0 from_profile:1
- Copy the 'authcode' key and paste it into okcupid.js.