Fb2cal
Fetch Facebook Birthdays events and create an ICS file for use with calendar apps
Install / Use
/learn @mobeigi/Fb2calREADME
Description
Around 20 June 2019, Facebook removed their Facebook Birthday ICS export option.
This change was unannounced and no reason was ever released.
fb2cal is a tool which restores this functionality.
It works by calling endpoints that power the https://www.facebook.com/events/birthdays/ page.
After gathering a list of birthdays for all the users friends for a full year, it creates a ICS calendar file. This ICS file can then be imported into third party tools (such as Google Calendar or Apple Calendar).
Caveats
- Facebook accounts secured with 2FA are currently not supported (see #9)
- During Facebook authentication, a security checkpoint may trigger that will force you to change your Facebook password.
Requirements
- Facebook account
- Python 3.9+
- pipenv
- Scheduler tool to automatically run script periodically (optional)
PyPi Project
https://pypi.org/project/fb2cal/
Instructions
PyPi (Recommended)
- In an empty folder of your choice, set up pipenv environment
pipenv install - Install
fb2calmodule:
pipenv run pip install fb2cal - Download config/config-template.ini file and store it in
config/config.ini. - Update the
config/config.inifile and enter your Facebook email and password (no quotes). - Run the
fb2calmodule
pipenv run python -m fb2cal - Check the output folder (
outby default) for the createdbirthdays.icsfile
Local
- Clone repo
git clone git@github.com:mobeigi/fb2cal.git - Copy
config/config-template.initoconfig/config.ini. - Update the
config/config.inifile and enter your Facebook email and password (no quotes). - Set up pipenv environment
pipenv install - Run the
fb2calmodule
pipenv run python -m fb2cal - Check the output folder (
outby default) for the createdbirthdays.icsfile
Configuration
This tool can be configured by editing the config/config.ini configuration file.
Scheduled Task Frequency
It is recommended to run the script once every 24 hours to update the ICS file to ensure it is synchronized with the latest Facebook changes (due to friend addition/removal) and to respect the privacy of users who decide to hide their birthday later on. Facebook originally recommended polling for birthday updates once every 12 hours based on the X-PUBLISHED-TTL:PT12H header included in their ICS files.
Testing
- Set up pipenv environment
pipenv install - Install the
fb2calmodule
pipenv run python -m pip install . - Run the
unittestsmodule on thetestsfolder
pipenv run python -m unittest discover tests
Troubleshooting
If you encounter any issues, please open the config/config.ini configuration file and set the LOGGING level to DEBUG (it is INFO by default). Include these logs when asking for help.
Contributions
Contributions are always welcome! Just make a pull request.
Licence
GNU General Public License v3.0
Related Skills
node-connect
336.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
82.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
82.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
336.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
