You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
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:
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 !
The text was updated successfully, but these errors were encountered: