Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

npm passport facebook

passport.use(new FacebookStrategy({
    clientID: FACEBOOK_APP_ID,
    clientSecret: FACEBOOK_APP_SECRET,
    callbackURL: "http://localhost:3000/auth/facebook/callback"
  },
  function(accessToken, refreshToken, profile, cb) {
    User.findOrCreate({ facebookId: profile.id }, function (err, user) {
      return cb(err, user);
    });
  }
));
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #npm #passport #facebook
ADD COMMENT
Topic
Name
6+7 =