{"id":16694702,"url":"https://github.com/weetbix/facebot","last_synced_at":"2025-03-17T00:33:33.202Z","repository":{"id":57232233,"uuid":"48431246","full_name":"Weetbix/facebot","owner":"Weetbix","description":"Slackbot for facebook messaging integration in slack","archived":false,"fork":false,"pushed_at":"2018-07-11T22:23:49.000Z","size":1785,"stargazers_count":94,"open_issues_count":5,"forks_count":21,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-26T19:48:41.561Z","etag":null,"topics":["facebook","facebook-messenger","slack","slackbot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Weetbix.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-12-22T12:40:33.000Z","updated_at":"2024-10-24T09:27:36.000Z","dependencies_parsed_at":"2022-08-31T18:33:54.442Z","dependency_job_id":null,"html_url":"https://github.com/Weetbix/facebot","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weetbix%2Ffacebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weetbix%2Ffacebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weetbix%2Ffacebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weetbix%2Ffacebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Weetbix","download_url":"https://codeload.github.com/Weetbix/facebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221669508,"owners_count":16860896,"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":["facebook","facebook-messenger","slack","slackbot"],"created_at":"2024-10-12T16:47:45.079Z","updated_at":"2024-10-27T11:36:50.655Z","avatar_url":"https://github.com/Weetbix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Facebot ![image](https://cloud.githubusercontent.com/assets/492636/12047946/c5488f22-af0e-11e5-86f4-f86c185065d8.png)\n\nFacebot is a [Slack](https://slack.com/) bot for facebook messenger integration. It allows you to link slack channels to facebook messenger, and communicate to them through slack.\n\n## Features\n- Connect slack channel to a facebook messenger channels\n- Messages appear using friends names and profile pictures\n- Supports all message types: Images, Stickers, Gifs, Thumbs \u0026 Audio messages\n- Facebook\u003c--\u003eSlack Emoji support\n- Channel links persist between restarts\n\n### Restrictions\n- Only 1 facebook account can login and is authorised to use the bot. Multi-user support could be added in the future but facebook-chat-api requires logins to use plaintext email and password, so these are passed and environment variables for a single account.\n- For privacy, you can only link completely private slack channels (just you and facebot) to messenger. The person you want to link must be a facebook friend.\n\n# Running the bot\n\n## Run on Heroku for free\nYou can immediately deploy and start using the bot by clicking the button below:\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Weetbix/facebot/tree/deploy)\n\nYou will need to enter your slack bot API key, facebook details and slack username, and it will begin running on a free heroku instance.\n\n## Downloading\nYou can download the package from npm with:\n```\nnpm install facebot\n```\n\n## Environment Variables\n\nFacebot requires the following environment variables:\n\nVariable|Description\n----|-----\n`BOT_API_KEY`|The slack bot API key, for the bot user you want to run facebot\n`BOT_NAME`|The name of your slack bot\n`AUTHORISED_USERNAME`|The slack username for the authorised user. The authorised user should be the owner of the Facebook account. Only the authorised user can interact with Facebot (link channels etc).\n`FACEBOOK_EMAIL`|Email address for the Facebook account you want to use\n`FACEBOOK_PASSWORD`|Password for the Facebook account you want to use\n`DATABASE_URL`|URL for a postgres or mysql database to save and load data from, see details below for format. This reduces the number of sign in messages you may receive by using existing cookies and tokens, and keeps channel links persistent through bot restarts. **If this is not set** the bot will still function, but you will lose channel links between sessions (if not using file based storage).\n`DEBUG_MESSAGES`|False by default. Set this to true to receive debug direct messages from Facebot \n\n### DATABASE_URL\n*  For mysql DATABASE_URL should be a json string that will be decoded.  For all possible options see: https://github.com/mysqljs/mysql#connection-options .  An example of a simple block would be: ```'{\"host\":\"localhost\",\"user\":\"me\",\"password\":\"secret\",\"database\":\"my_db\"}'```\n*  For postgres this should be the the connection string that is given to pg.Client. \n\n## Running Locally\nYou can test or run Facebot locally with `node bin/run_local_storage.js`\n\nYou will still need to setup the environment variables described above (without `DATABASE_URL`). `run_local_storage.js` will use the local file system to store the login data and any channel links, this is usually not appropriate when running on a PaaS such as Heroku.\n\n# Using the Bot \n\n## Commands\n![image](https://cloud.githubusercontent.com/assets/492636/12048090/387b0914-af11-11e5-95f5-0e2c1233565a.png)\n\n## Linking Chats\nTo link a slack channel to a Facebook friend, create a new **private channel** and invite Facebot. Then send `@facebot chat FriendNameHere` to link incoming and outgoing messages.\n\n![image](https://cloud.githubusercontent.com/assets/492636/12016755/efcb3046-ad89-11e5-9837-a8b835b07949.png)\n\n\n# Contributing\n\nPull requests more than welcome! \n\nSome things to keep in mind\n\n### Yarn\nThis project uses yarn to lock down dependencies, so when adding another dependency remember to update the yarn.lock file\n\n### Prettier\nIn order to keep the code formatting and style consistent this project uses [Prettier](https://github.com/prettier/prettier) to enforce formatting. \n\nPrettier is installed as a dev dependency, and a pre-commit hook is setup to automatically run and prettify staged files just before commiting. \n\n#### Running Prettier Manually\nCheck out the [Prettier docs](https://github.com/prettier/prettier#usage) for instructions on how to run Prettier from the commandline, or inside your editor using a [plugin](https://github.com/prettier/prettier#editor-integration).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweetbix%2Ffacebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweetbix%2Ffacebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweetbix%2Ffacebot/lists"}