fbapp-test-users
A node module to manage Facebook Test Users of an application.
Installation
$ npm install fbapp-test-users
var FbTestUsers = require('fbapp-test-users');
Usage
var FbTestUsers = require('fbapp-test-users');
FbTestUsers.setAppId('XXXX');
FbTestUsers.setAppSecret('YYYY');
getList(limit)
Retrieve the list of test users.
By default, if no limit is given, the function gets all the test users.
FbTestUsers.getList(50)
.then(function(list) {
});
createUser(args)
Create a test user.
Args
See the fields in the official documentation.
FbTestUsers.createUser({
installed: false,
name: 'Batman'
})
.then(function(createdUser) {
});
updateUser(userId, name, password)
Update a test user.
Args
name
and password
can be null if you don't want to update the name or password.
FbTestUsers.updateUser(user.id, 'New name', 'New password')
.then(function success(res) {
});
deleteUser(userId)
Delete a test user.
FbTestUsers.deleteUser(user.id)
.then(function success(res) {
});
License
MIT, see LICENSE.md for details.