sending message to facebook using node js api

48 views
Skip to first unread message

Sasi Kumar

unread,
Jul 9, 2016, 9:26:56 AM7/9/16
to nodejs
how to send the message to facebook using node js.
im using below method
FB.api('oauth/access_token', {
    client_id: 'app_id',
    client_secret: 'app_secret',
    grant_type: 'client_credentials'
}, function (res) {
    if(!res || res.error) {
        console.log(!res ? 'error occurred' : res.error);
        return;
    }
 
    var accessToken = res.access_token;
});

i have faced some problem

C:\fb-message>node facebook.js { message: 'client_secret should not be passed to /oauth/
access_token {
    client_id: 'app_id',
    client_secret: 'app_secret',
    grant_type: 'client_credentials'\
}}

please tell me how to solve this problem.
Reply all
Reply to author
Forward
0 new messages