How to get authorize code from facebook using Node js

Here is my code about trying to get authorize code in Node js:

var FB = require('fb');
FB.api('oauth/authorize', {
    client_id : '160355604145399',
    redirect_uri : Convas Url
}, function(res) {
    if (!res || res.error) {
        console.log('error')
        console.log(!res ? 'error occurred' : res.error);
        return;
    }
    console.log(res.code);
});

The problem is I always get error information like { code: 'JSONPARSE', Error: [SyntaxError: Unexpected token <] }. Please give me some help.

You have <br> tags in the code. Probably from copy pasting. Delete them and it should work.