Hi, I am a super beginner about Node.js and Express
facebook-template-nodejs example works fine, then I would like to add res.redirect('/AnotherPage') when pushed a button. But I can not get solution. Because your code:
app.get('/',handle_facebook_request);
app.post('/',handle_facebook_request);
I wonder if I should write like as:
function handle_facebook_request(req,res){
if(req.param('button')){
res.redirect('/AnotherPage');
}
....
});
But I think it is wrong. Where should I assign res.redirect?
In case of pushed button, I always write as:
app.post('/', function(req,res){
if(req.param('button')){
res.redirect('/AnotherPage');
}
});
But I am not sure about your example case.
Thank you for your thoughts !