Thursday 13 April 2017

Node.js Facebook API

I am new to Node.js and I am having difficulties. I just wanted someone to explain where I am going wrong. I am trying to get stats from my Facebook chats and I wanted to used this API call. This is the basic code I have written.

var login = require("facebook-chat-api");

login({email: "Email", password: "Password"}, function callback (err, api) {
    if(err) return console.error(err);
    var threadID = chatNo;
    output = api.getThreadInfo(threadNo)
    console.log(output)

});

When I run this on Node.js the output is "undefined", I cant tell if its because the API call didn't work, or because I am trying to output it incorrectly. Any help would be greatly appreciated.
Output of Node.js



via C.Molloy

No comments:

Post a Comment