Node package providing programmatic access to the Happn API
This package is under develop. For now, only authenticate an user.
Inspired in rickhousley/happn
npm install node-happn
First you need a facebook token to create a Happn User-Object. You can get the one associated with your facebook account by clicking here and copying it from the address bar.
var HappnAPI = require('node-happn');
var happnInstance = new HappnAPI();
var fb_access_token = 'YOUR-FB-ACCESS-TOKEN';
var assertion_type = 'facebook'; // only allows facebook.
happnInstance.connect(
fb_access_token,
assertion_type,
// callback
function(err, resp){
if (err) {
console.log(err)
return;
}
// user_id of the authenticated user.
console.log(resp.user_id);
}
);
- Can you see the list of features here.