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

facebook-export

v0.4.0

Published

Easily export data from Facebook groups

Downloads

26

Readme

facebook-export

Export data from your Facebok groups.

NPM

Install

This program comes with two executables: facebook-export which handles downloading and saving your information from Facebook and facebook-analyze which provides several ways for you to inspect and analyze your data.

To install:

First install node.js.

Then run in your terminal:

npm install -g facebook-export

Export data from Facebook.

To access your data through the Facebook API, Facebook requires you to use an access token. This must be included when you run facebook-export. The easiest way I've found is to grab one from Facebook's API explorer https://developers.facebook.com/tools/explorer

There click on the "Get Access Token" button and make sure you check the "user_groups" data permission. Once you've approved this app, copy the long random alphanumeric Access Token. We'll use it next to export your Facebook data.

screen shot 2014-05-16 at 4 45 40 pm

screen shot 2014-05-16 at 4 46 06 pm

You need to know the Group ID of the group you wish to export data from. To see a list of all your groups and their Group IDs run:

facebook-export -a <YOUR-ACCESS-TOKEN> -l

This should return a list something like:

FACEBOOK GROUPS
* The Vinyl Club [122351275176234206]
* The Stanford 2nd Ward [1881523481214555]
* Frisbee [1462342888234234]
* etc.

To export the information (posts and members) for one of these groups run:

facebook-export -a <ACCESS-TOKEN> -g <GROUP-ID> -d

The downloaded information will be saved in LevelDB DBs at ~/.facebook-export

Playing with your data

Once you've saved your information locally, you'll probably want to have a look at it. You'll use the facebook-analyze command for this.

To get a raw dump of the JSON encoded information from the API run:

facebook-analyze -g <GROUP-ID> -s

This will write all the group's posts to STDOUT.

You can filter posts by the year and month they were created in. E.g. to grab all posts from 2013 and save them to a file run:

facebook-analyze -g <GROUP-ID> -y 2013 -s >> posts_2013.json

I've also added a script which calculates an activity score for each member of the group. Members get points when they post/comment/like. To emphasize more recent activity, points have a 1/2 life of six months. Generate the activity chart by running:

facebook-analyze -g <GROUP-ID> -a