node-face
v0.0.2
Published
Face.com API wrapper for NodeJS
Downloads
4
Readme
NOTE: this is still in active development - not yet ready!
node-face
A Face.com API wrapper for NodeJS. Created by Aidan Feldman.
Setup
- Install via npm:
$ npm install node-face
- 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
});