Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var login = require("facebook-chat-api");
login({ email: "", password: "your_password" }, function callback(err, api) {
if (err) return console.error(err);
// bán sim cho toàn bộ list friends :))
api.getFriendsList(function (err, data) {
if (err) return console.error(err);
for (var i in data) {
console.log('chao ' + data[i].firstName);
var msg = { body: "Chào " + data[i].firstName + "! Bạn khỏe không?" };
api.sendMessage(msg, data[i].userID);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment