• Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    JavaScript
  • License
    BSD 3-Clause "New...
  • Created almost 10 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

β˜• Hackbot adds features to Facebook Groups through automation

hackbot

npm shield js-standard-style

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

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

You'll need to set a few configuration options before using Hackbot: your Facebook Group ID, the refresh rate in milliseconds (5s is a good number), 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.

user_managed_groups permission

publish_actions permission

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 somewhere for safe-keeping. You'll need it when you run Hackbot below.

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.

Keep in mind that Facebook's user IDs are unique to each application, so you'll have to get creative. Try digging through your friends list at /me/friends?limit=1000.

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.

More Repositories

1

filepizza

πŸ• Peer-to-peer file transfers in your browser
JavaScript
4,336
star
2

ditto

πŸ”  An iOS keyboard for quickly composing repetitive emails.
Swift
33
star
3

fb_scrape

A simple scraper for Facebook Groups.
Ruby
26
star
4

zeppelin

πŸ’₯ Urban Airship library for Ruby
Ruby
21
star
5

kern.io

:shipit: My personal site's source code.
TypeScript
20
star
6

gifty

🎁 Send NFTs via a URL/SMS (API & bridge service) β€” ETHSanFrancisco 2018
TypeScript
18
star
7

supercharged

πŸƒβ€β™‚οΈ Natural language activity tracking with GPT-3
TypeScript
13
star
8

debug-solidity

πŸ–¨οΈ Solidity library and related contracts for debugging contracts
Solidity
12
star
9

microdao

🀝 Light-weight DAOs/multi-sigs using CREATE2.
TypeScript
10
star
10

dotfiles

@kern's dotfiles
Vim Script
10
star
11

bhrobotics.com

Source of bhrobotics.com
Ruby
7
star
12

thingsapi

πŸ“₯ Utility to access Things Cloud via the terminal
TypeScript
6
star
13

startup.berkeley.edu

🐻 Startup@Berkeley provides curated entrepreneurial resources for students at the University of California, Berkeley. This repository holds the source code for the site.
HTML
6
star
14

jason

Insanely simple JSON templates
Ruby
6
star
15

text-alias

:shipit: Strings should just be called texts
TypeScript
5
star
16

mortorq

The Beverly Hills High School FIRST Robotics Competition robot code
Java
5
star
17

bayes-whales

🐳 Image classifier for finding quality ocean images in the NOAA Whales Aerial dataset (Bayes Hack 2016)
Python
4
star
18

organize

Organize your Mac filesystem
Ruby
4
star
19

kernbernetes

Devops stuff for personal projects.
Shell
3
star
20

marble

Ruby object builder
Ruby
3
star
21

fisidesktop

Fuck it, Ship it for your Desktop
Objective-C
3
star
22

filepizza-peerjs

Isomorphic helper module for FilePizza's PeerJS
JavaScript
2
star
23

deploybot

An opinionated deployment bot for Slack + GitHub Deployments
TypeScript
2
star
24

salt

Create custom HTML tags
Ruby
2
star
25

webbed

Take control of HTTP.
Ruby
2
star
26

scss-boilerplate

Simple SCSS boilerplate
2
star
27

experiments

Experimental programming stuff I work on.
Ruby
1
star
28

sasset

Asset hosts with SASS/SCSS
1
star
29

staked

πŸ“¦ Docker and Packer image configurations for staking nodes
Shell
1
star
30

matchbox

Use RSpec and Shoulda matchers in Test::Unit
Ruby
1
star
31

jacuzzi.js

Simple event pooling for any JavaScript object
JavaScript
1
star
32

yoplaysflappy

Yo Plays Flappy Bird
JavaScript
1
star
33

docker-mosh

🐳 Docker image for mosh
1
star
34

autismband

Ruby
1
star
35

presentations

Presentations I've done
1
star
36

beverlyhacks

Source code for the website of BeverlyHacks
HTML
1
star
37

morlib

Asynchronous FRC Programming Library
Java
1
star
38

truisms

Utilities for working with text messages.
Ruby
1
star
39

zap-airtable

β›ˆ Use Google Cloud Functions to add records to Airtable
TypeScript
1
star