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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hackbot

v0.1.3

Published

Hackbot adds moderative features to Facebook Groups through automation.

Downloads

12

Readme

Hackbot adds features to Facebook Groups through automation.

An instance of Hackbot is running on Hackathon Hackers.

Installation

1. Install Hackbot

$ npm install -g hackbot

2. Get your long-lived Facebook access token

You'll need to set a few configuration options before using the hackbot in config.json. Add your Facebook Group ID, the refresh rate in milliseconds, and the IDs of the group's moderators to the configuration file.

To generate an access token, open up the Facebook Graph API Explorer and make sure you're using a custom application. Click "Get Access Token" and make sure the user_managed_groups and publish_actions permissions are ticked.

Click the blue "Get Access Token" in the modal. Copy the short-lived access token and navigate in your browser to the following URL:

https://graph.facebook.com/oauth/access_token?
    client_id=APP_ID&
    client_secret=APP_SECRET&
    grant_type=fb_exchange_token&
    fb_exchange_token=SHORT_LIVED_ACCESS_TOKEN

Replace APP_ID, APP_SECRET, and SHORT_LIVED_ACCESS_TOKEN with the proper values. Take the long-lived (60 day) access token in the body and save it in an environment variable named ACCESS_TOKEN. Then you should be good to go!

Keep in mind that Facebook's user IDs are unique to each application, so you'll have to find some way of finding out moderator IDs using the Graph API.

Note: This process is annoying. Please consider implementing this through a web-based flow.

3. Collect the Graph IDs of your group's moderators

You can use the Graph API Explorer to find the numeric Graph API IDs of your group's moderators.

Usage

There will be much better usage documentation coming soon, but here's how it works:

$ hackbot GROUP_ID ACCESS_TOKEN -m MOD_ID1,MOD_ID2,MOD_ID3 -s close,delete --interval 5

Development

Hackbot uses JavaScript Standard Style and Babel for ES6+ support.

$ git clone [email protected]:kern/hackbot.git
$ npm install
$ npm run dev -- [see usage above]

Lint before committing:

$ npm run lint

License & Acknowledgements

Hackbot is released under the BSD 3-Clause license. The initial prototype was made with caffeine at MHacks V by Alex Kern and Eva Zheng.