I'm working on a project in NodeJS where I want to login using username / password or by using facebook. I've searched and found there is a module for NodeJS called http://passportjs.org/ which integrates different strategies for different social platforms ( facebook, twitter etc ).
After being logged in I also want to acces different information about the user such as friends list, possibility to post on their wall and so on. From what I see facebook strategy for passport doesn't support this.
My second option is to use https://github.com/amachang/facebook-node-sdk . This allows me to login, and also get the friends list, post on user wall, etc.
Is it possible to use both ? Login using facebook strategy from passport, and then pass the token to the facebook sdk api to use it for posting on user wall.
What is the best approach ? How would you see the integration with facebook ?
Thank you very much for your answer
Well passport does in fact support this. You can specify permissions in the scope object like this
app.get('/auth/facebook',
passport.authenticate('facebook', { scope: ['read_stream', 'publish_actions'] })
);
This is mentioned in the passport docs. Here is the list of permissions that you can actually request from Facebook.