by mobeigi

mobeigi / fb2cal

Fetch Facebook Birthdays events and create an ICS file for use with calendar apps

292 Stars 59 Forks Last release: 3 months ago (v1.1.0) GNU General Public License v3.0 77 Commits 6 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Facebook Birthday Events to ICS file converter


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 various async 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).

This tool does not use the Facebook API.


  • Facebook account
  • Python 3.6+
  • pipenv
  • Scheduler tool to automatically run script periodically (optional)


  1. Clone repo
    git clone [email protected]:mobeigi/fb2cal.git
  2. Rename
    and enter your Facebook email and password (no quotes).
  3. Install required python modules
    pipenv install
  4. Run the script manually:
    pipenv run python src/fb2cal.py
  5. Import the created
    file into Calendar applications (i.e. Google Calendar)


This tool can be configured by editing the

configuration file.
Section Key Valid Values Description
AUTH fb_email Your Facebook login email
fb_password Your Facebook login password
FILESYSTEM save_to_file True, False If tool should save ICS file to the local file system
ics_file_path Path to save ICS file to (including file name)
LOGGING level DEBUG, INFO, WARNING, ERROR, CRITICAL Logging level to use. Default: INFO


If you encounter any issues, please open the

configuration file and set the
(it is
by default). Include these logs when asking for help.

Also make sure to check the Caveats section below.

fb2cal Setup Guide for Non-Devs [Windows]

fb2cal Setup Guide for Non-Devs [Windows]

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

header included in their ICS files.


  • 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.
  • Some locales are currently not supported (see #13)
  • Some supported locales may fail. Consider changing your Facebook language to English temporarily as a workaround. (see #52)
  • Duplicate birthday events may appear if calendar is reimported after Facebook friends change their username due to performance optimizations. (see #65)


Contributions are always welcome! Just make a pull request.


GNU General Public License v3.0

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.