0
我正在關注facebook Connect-auth exemple的示例。我不明白如何讓這個例子工作。Facebook示例不能在Connect-auth/Express中工作
在這個代碼片段從以前的鏈接採取:
// Method to handle a sign-in with a specified method type, and a url to go back to ...
app.get('/signin', function(req,res) {
req.authenticate([req.param('method')], function(error, authenticated) {
if(authenticated) {
res.end("<html><h1>Hello Facebook user:" + JSON.stringify(req.getAuthDetails()) + ".</h1></html>");
}
else {
res.end("<html><h1>Facebook authentication failed: " + error + " </h1></html>");
}
});
});
我不明白這是什麼並不[req.param('method')]
是什麼意思?很難理解connect-auth
和facebook如何協同工作。我一直在認證失敗。
我也無法使它工作,總是讓Facebook身份驗證失敗。 – toy