An SDK for accessing the FantasyBach backend. This repo is consumable as an npm module for use in a CommonJS project (i.e. a browserify project).
After you have checked out this repo, run the following commands:
cd directory/of/reponpm installnpm linkcd direcotry/of/repo/using/SDKnpm link fantasybach-sdk
/loginendpoint will (if succuessful) return authorization credentials and the user's id. The credentials will automatically be applied to the SDK and future requests. The credentials will expire every hour.
example directory contains a sample webpage that performs a number of API calls. To run the example, setup a static webserver to load the html file and build the
index.js file into
bundle.js. This can be done with the following commands:
npm install -g static browserifybrowserify example/index.js > example/bundle.jsstatic ./example
You will also have to change the facebook token in
index.js. Assuming you have permissions, a valid token can be generated at: https://developers.facebook.com/tools/explorer/307416292730318