var express = require('express');
var fb = require('fb_oauth');
var app = express();
app.use(fb({
client_id : 'YOUR CLIENTID',
client_secret : 'YOUR CLIENTSECRET'
}));
var express = require('express');
var router = express.Router();
var fb_oauth = require('fb_oauth').OAuth;
router.get('/login', function(req, res, next) {
fb_oauth.on(fb_oauth.Events.ON_SUCCESS, function(token){
});
fb_oauth.on(fb_oauth.Events.ON_FAIL, function(err) {
});
fb_oauth.authenticate(req,res,['public_profile','email'],{
onsuccess : '/',
onfail : '/fail'
});
});