Skip to content

Instantly share code, notes, and snippets.

@mdedetrich
Created November 26, 2012 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdedetrich/8649cf29d64bd9d417f9 to your computer and use it in GitHub Desktop.
Save mdedetrich/8649cf29d64bd9d417f9 to your computer and use it in GitHub Desktop.
app.get('/fbRedirect/:facebookApplicationID',(req,res)->
facebookApplicationID = req.param('facebookApplicationID')
code = req.param('code')
db.facebookApplications.find({_id:db.ObjectID.createFromHexString(facebookApplicationID)}).toArray((err,results)->
req.session.redirectCode = code
req.session.redirectFbAppID = results[0].fbAppID
req.session.redirectFbAppSecret = results[0].fbAppSecret
req.session.redirectApplicationID = facebookApplicationID
req.session.save((err)->
res.type('html')
res.send(acceptHtml)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment