A small API for accessing Facebook profile, pages, groups posts and notifications as RSS feeds. Based on FastAPI and Playwright.
The tool is no longer under-development. Facebook doesn't like it, check more info here https://github.com/yshalsager/facebook2rss/issues/21
1- This tool is provided with no warranty of any kind. I am not responsible for anything that might happen to your Facebook account that will be automated by this tool.
2- This tool is still experimental. It has not been tested heavily and still has some features that are not implemented yet. I built it for personal use but decided to release it as a public open source project. If you have any questions or suggestions feel free to open an issue. Contributions are welcome too!
The tool requires Python 3.7 with pip v19+ installed or poetry if you use it.
Clone the repository and run any of the following commands:
poetry install
pip install .
Finally, install Playwright required files
playwright install chromium
You can use Docker to deploy the API quickly.
Build docker image
docker build -t facebook2rss .
Run the container
docker run -p 8000:8000 -e EMAIL=email -e PASSWORD=password -d facebook2rss
email
and password
are facebook credentials. You can use any environmental variables defined in config_example.env
as:
docker run -p 8000:8000 -e EMAIL=email -e PASSWORD=password -e API_KEY="123" -e USE_KEY=True -d facebook2rss
config_example.env
and fill it with your desired configuration.start.sh
file before
deployment.docker-compose up -d
docker-compose logs -f
.Notes:
start.sh
and docker-compose.yml
.docker-compose stop
.docker-compose start
.docker-compose down
.docker-compose up -d
.python3 -m facebook_rss --login -u email -p password
uvicorn facebook_rss.main:api
--env-file
uvicorn facebook_rss.main:api --env-file config_example.env
All you need to do is to access the respective Facebook feed API route as detailed in the available API documentation thanks to FastAPI.
For example if the API is running on localhost and port 8080 you can access the documentation
in http://127.0.0.1:8080/docs
.
In a nutshell, here are the available routes:
no_cache=1
parameter with any of the API routes.api_key
that can be configured via env file. (Disabled by default)