node-face

Face.com API wrapper for NodeJS

npm install node-face
2 downloads in the last week
2 downloads in the last month

NOTE: this is still in active development - not yet ready!

node-face

A Face.com API wrapper for NodeJS. Created by Aidan Feldman.

Setup

  1. Install via npm:
$ npm install node-face
  1. Require in your node project:
// app.js
var face = require('node-face');

face.init(FACE_API_KEY, FACE_API_SECRET);

It's usually best to set your API key and secret as environment variables - something like

# ~/.bash_profile
export MYAPP_FACE_API_KEY=<insert key here>
export MYAPP_FACE_API_SECRET=<insert secret here>
// app.js
face.init(process.env.MYAPP_FACE_API_KEY, process.env.MYAPP_FACE_API_SECRET);

Just don't forget to run $ source ~/.bash_profile after you modify your .bash_config.

Usage

facebook.get

"Returns facebook tags for one or more specified User IDs."

face.facebook.get({
  uids: '2232645,571756321', // integer, array or string of IDs
  user_auth: { // object or string
    fb_user: 2232645,
    fb_oauth_token: ...
  },
  success: function(data){ ... },
  error: function(error, response, data){ ... }, // optional
  scope: this // optional
});
npm loves you