New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fbapp-test-users

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fbapp-test-users

List, create, update and delete Facebook test users for an application

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fbapp-test-users

A node module to manage Facebook Test Users of an application.

  • List the test users
  • Create a test user
  • Update a test user
  • Delete a test user

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) {
    // Example:
    /*
    [
        {
            id: '123456789',
            loginUrl: 'https://developers.facebook.com/checkpoint/test-user-login/123456789/',
            accessToken: 'XXXXXXXXXX',
            name: 'Open Graph Test User',
            link: 'http://www.facebook.com/123456789'
        }
    ]
    */
});

createUser(args)

Create a test user.

Args

See the fields in the official documentation.

FbTestUsers.createUser({
    installed: false,
    name: 'Batman'
})
.then(function(createdUser) {
    // Example:
    /*
    {
        id: '123456789',
        email: 'xxx',
        login_url: 'https://developers.facebook.com/checkpoint/test-user-login/123456789/',
        password: '1876562816'
    }
    */
});

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) {
    // This function returns the result of the operation [true|false]
    // Example:
    /*
    {
        success: true
    }
    */
});

deleteUser(userId)

Delete a test user.

FbTestUsers.deleteUser(user.id)
.then(function success(res) {
    // This function returns the result of the operation [true|false]
    // Example:
    /*
    {
        success: true
    }
    */
});

License

MIT, see LICENSE.md for details.

Keywords

FAQs

Package last updated on 12 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc