npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fb-test-users

v0.2.1

Published

A utility to create, read, update, and delete Facebook test users for your Facebook application

Readme

fb-test-users

fb-test-users is a utility module to create, read, update, and delete Facebook test users for your Facebook application.

Installation

$ npm install fb-test-users

Documentation


<a name="FBTestUsers") />

FBTestUsers(options)

Returns a new FBTestUsers object.

Arguments

  • options.appID - Your Facebook App ID.
  • options.secret - Your Facebook App Secret.
  • options.access_token - Your Facebook App's access token. Optional, if not specified, this will be lazily-fetched & cached when it is needed.

Example

FBTestUsers = require('fb-test-users');
fbTestUsers = new FBTestUsers({appID: 'YOUR_APP_ID', secret: 'YOUR_APP_SECRET'});

Arguments

  • args.limit - The number of users to create. Optional, defaults to 1.
  • args.installed - Set the user's 'installed' parameter. Optional, defaults to true.
  • args.permissions - Set the user's xw'permissions' parameter. Optional, defaults to 'read_stream'.
  • callback(error, result) - The callback which is called after the user(s) are created, or an error occurred.
    • error - Error object
    • user - Array of user objects

Example

fbTestUsers.create({}, function(error, result){
  console.log(result);
});

Fetch an array of all test users associated with this app.

Arguments

  • **limit - The numbers of users returned - default value is 50

  • callback(error, users) - The callback which is called after the users have been fetched, or an error occurred.

    • error - Error object
    • user - Array of user objects

Example

fbTestUsers.list(function(error, users){
  console.log(users);
});

Example with limit, get 100 users

fbTestUsers.list(100, function(error, users){
  console.log(users);
});

Update a test user's name and/or password.

Arguments

  • userID - The Facebook userID of the user to update.
  • args.name - The new name for the user. Optional.
  • args.password - The new password for the user. Optional.
  • callback(error, success - The callback which is called after the user has been updated, or an error occurred.
    • error - Error object
    • success - Boolean - true on success, false otherwise

Example

fbTestUsers.update('100006249401765', {name: 'Testy McCool', password: 'nottest'}, function(error, success){
  console.log(success);
});

Delete a test user.

Arguments

  • userID - The Facebook userID of the user to delete.
  • callback(error, success) - The callback which is called after the user has been deleted, or an error occurred.
    • error - Error object
    • success - Boolean - true on success, false otherwise

Example

fbTestUsers.delete('100006249401765', function(error, success){
  console.log(success);
});

Running Tests

To run the test suite first invoke the following command within the repo, installing the development dependencies:

$ npm install

then create a file test/creds.json containing the following:

{
  "appID": "YOUR_APP_ID",
  "secret": "YOUR_APP_SECRET"
}

Finally, run the tests:

$ make test

License

(The MIT License)

Copyright (c) 2013 Patrick DeSantis <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.