{"id":17066298,"url":"https://github.com/kern/hackbot","last_synced_at":"2025-04-12T18:14:10.747Z","repository":{"id":26119565,"uuid":"29564051","full_name":"kern/hackbot","owner":"kern","description":":coffee: Hackbot adds features to Facebook Groups through automation","archived":false,"fork":false,"pushed_at":"2016-01-07T02:37:01.000Z","size":430,"stargazers_count":102,"open_issues_count":15,"forks_count":28,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-12T18:14:05.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-21T01:09:41.000Z","updated_at":"2025-03-29T21:14:29.000Z","dependencies_parsed_at":"2022-08-25T05:00:59.992Z","dependency_job_id":null,"html_url":"https://github.com/kern/hackbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kern%2Fhackbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kern%2Fhackbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kern%2Fhackbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kern%2Fhackbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kern","download_url":"https://codeload.github.com/kern/hackbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610336,"owners_count":21132920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T11:06:33.860Z","updated_at":"2025-04-12T18:14:10.724Z","avatar_url":"https://github.com/kern.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/kern/hackbot/master/resources/logo.png\" alt=\"hackbot\" width=\"354\" /\u003e\n\n[![npm shield](https://img.shields.io/npm/v/hackbot.svg)](https://www.npmjs.com/package/hackbot) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n\n*Hackbot adds features to Facebook Groups through automation.*\n\nAn instance of Hackbot is running on [Hackathon Hackers](https://facebook.com/groups/hackathonhackers).\n\n## Installation\n\n### 1. Install Hackbot\n\n    $ npm install -g hackbot\n\n### 2. Get your long-lived Facebook access token\n\n*Note:* This process is annoying. Please consider [implementing this through a web-based OAuth flow][oauth-issue].\n\nYou'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.\n\nTo generate an access token, open up the [Facebook Graph API Explorer][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.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kern/hackbot/master/resources/user_managed_groups.png\" alt=\"user_managed_groups permission\" width=\"555\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/kern/hackbot/master/resources/publish_actions.png\" alt=\"publish_actions permission\" width=\"555\" /\u003e\n\nClick the blue \"Get Access Token\" in the modal. Copy the short-lived access token and navigate in your browser to the following URL:\n\n    https://graph.facebook.com/oauth/access_token?\n        client_id=APP_ID\u0026\n        client_secret=APP_SECRET\u0026\n        grant_type=fb_exchange_token\u0026\n        fb_exchange_token=SHORT_LIVED_ACCESS_TOKEN\n\nReplace `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.\n\n[explorer]: https://developers.facebook.com/tools/explorer/\n[oauth-issue]: https://github.com/kern/hackbot/issues/6\n\n### 3. Collect the Graph IDs of your group's moderators\n\nYou can use the [Graph API Explorer][explorer] to find the numeric Graph API IDs of your group's moderators.\n\nKeep 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`.\n\n[explorer]: https://developers.facebook.com/tools/explorer/\n\n## Usage\n\nThere will be *much* better usage documentation coming soon, but here's how it works:\n\n    $ hackbot GROUP_ID ACCESS_TOKEN -m MOD_ID1,MOD_ID2,MOD_ID3 -s close,delete --interval 5\n\n## Development\n\nHackbot uses [JavaScript Standard Style](https://github.com/feross/standard) and [Babel](https://babeljs.io/) for ES6+ support.\n\n    $ git clone git@github.com:kern/hackbot.git\n    $ npm install\n    $ npm run dev -- [see usage above]\n\nLint before committing:\n\n    $ npm run lint\n\n## License \u0026 Acknowledgements\n\nHackbot is released under the [BSD 3-Clause][license] license. The initial prototype was made with caffeine at [MHacks V][mhacks] by [Alex Kern][kern-twitter] and [Eva Zheng][eva-twitter].\n\n[license]: https://github.com/kern/hackbot/blob/master/LICENSE\n[mhacks]: http://mhacks.org\n[kern-twitter]: https://twitter.com/KernCanCode\n[eva-twitter]: https://twitter.com/evadoraz\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkern%2Fhackbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkern%2Fhackbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkern%2Fhackbot/lists"}