skip to Main Content

Nodejs, Request and Dot notation – Facebook api

I am trying to get first name of a facebook user via their API. This is my code var user = request("https://graph.facebook.com/v2.6/"+psid+"?fields=first_name,last_name&access_token="+token, function(err, res, body) { console.log("name: " + body.first_name); console.log("body: " + body); }); This is the result: name:…

VIEW QUESTION

Pass variable to callback – nodejs – Facebook api

I'm creating a simple Messenger bot, using unofficial Facebook Chat API (https://github.com/Schmavery/facebook-chat-api) and Node.js. For now, I'm working on sending messages to specific users, on a specific time. Here's part of my code: if(msgdate.getTime() <= currdate.getTime()){ console.log(alarms[i].message); // output: test…

VIEW QUESTION

Memcached – Session Data is not updating

I m using express-session and memcached-connect package for maintaining session. Everything is working as expected. Here is my implementation: Middleware app.use(session({ rolling: true, secret: 'iloveexpress', proxy: 'true', store: new MemcachedStore({ hosts: ['127.0.0.1:11211'] }), cookie: { maxAge: 86400000, path: "/", domain:…

VIEW QUESTION
Back To Top
Search