• Stars
    star
    419
  • Rank 103,397 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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


fb2cal

Facebook Birthday Events to ICS file converter


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.6+
  • pipenv
  • Scheduler tool to automatically run script periodically (optional)

Instructions

  1. Clone repo
    git clone [email protected]:mobeigi/fb2cal.git
  2. Rename config/config-template.ini to config/config.ini and enter your Facebook email and password (no quotes).
  3. Set up pipenv environment
    pipenv install
  4. Run the fb2cal module
    pipenv run python -m fb2cal
  5. Check the output folder (out by default) for the created birthdays.ics file

Configuration

This tool can be configured by editing the config/config.ini configuration file.

Section Key Valid Values Description
AUTHfb_emailYour Facebook login email
fb_passwordYour Facebook login password
FILESYSTEMsave_to_fileTrue, FalseIf tool should save ICS file to the local file system
ics_file_pathPath to save ICS file to (including file name)
LOGGINGlevelDEBUG, INFO, WARNING, ERROR, CRITICALLogging level to use. Default: INFO

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

  1. Set up pipenv environment
    pipenv install
  2. Install the fb2cal module
    pipenv run python -m pip install .
  3. Run the unittests module on the tests folder
    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

More Repositories

1

filebot

This is a fork of the official FileBot source code which has since been close sourced.
Java
122
star
2

Algorithmic-Trading

Algorithmic Trading software designed to make money on the equity market.
C++
17
star
3

Discord-Farmer

Discord Farmer which changes Discord Discrims of accounts using username changes
Python
11
star
4

EasyDownloader

Download and Precache files the easy way.
SourcePawn
8
star
5

AutoHotKey-Scripts

My collection of AutoHotKey scripts
AutoHotkey
7
star
6

FakeBSOD.com

Website source files for FakeBSOD.com
PHP
7
star
7

Wordpress-SHA256-Password-Override

A short plugin to force Wordpress to use SHA-256 + a salt when hashing and checking passwords.
PHP
3
star
8

Flappy-Siavash

Flappy Bird clone starring my Green-cheeked conure Siavash!
Java
3
star
9

Circular-DHT-Network

Python based Circular DHT Network
Python
3
star
10

COMP3411-Adventure-Game

AI Player for 2D grid text based adventure game
Java
2
star
11

MyBB-MyAwards

MyBB-MyAwards
PHP
2
star
12

Discord-Theme-Wars-Bot

Discord bot that sends a special message that shows differently based on users light/dark theme preference
Python
2
star
13

reportbot.pro

PHP based web interface designed to be used with Askwrites Node Report Bot (https://github.com/Askwrite/node-csgo-reportbot)
PHP
2
star
14

COMP3421-3D-World

COMP3421 Assignment 2
Java
2
star
15

VSCode-SourcePawn-tasks.json

SourcePawn tasks.json build script for VSCode
Batchfile
2
star
16

AntiVoiceLoopback

Block HLDJ/SLAM/Voice Loopback tools
SourcePawn
2
star
17

mobeigi.com

Source code for the mobeigi.com website.
CSS
1
star
18

COMP9321-DLBPlus

Web Application for Digital Bibliographic Library (COMP9321 Assignment 2)
JavaScript
1
star
19

COMP3411-Assignment-1

Assignment 1 - Prolog Programming
Prolog
1
star
20

cracking-the-coding-interview

My Java Solutions to Cracking the Coding Interview (6th Edition) by Gayle Laakmann McDowell
Java
1
star
21

Generic-Databases

A basic C++ implementation of a generic database.
C++
1
star
22

MyBB-Strict-Username

Source: https://community.mybb.com/mods.php?action=view&pid=350
PHP
1
star
23

COMP3421-2D-Game-Engine

COMP3421 Assignment 1
Java
1
star
24

MyBB-DVZ-Secure-Content

Fork from DVZ Secure Content (Version 1.1.5)
PHP
1
star
25

sepehr-stream-generator

Get latest stream links from Sepehr to produce working m3u file
Python
1
star
26

Algorithmic-Trading-Website

Website that users can use to download the Algorithmic Trading application.
HTML
1
star
27

ExchangeForwarder

Forward Emails over Exchange Web Services (EWS) to other services
Python
1
star
28

TCAdmin-PHP

PHP class to interact with TCAdmin Game Server Panels
PHP
1
star
29

EasyWebShortcuts

Web Shortcuts
SourcePawn
1
star
30

Mekong.com.au-CGI-Website

COMP2041 Ass2 - Create a bookstore website that is powered using CGI and Perl.
Perl
1
star
31

PoroQueue

An automatic queue application for the League of Legends MOBA game.
C++
1
star
32

dvzshoutbox

Lightweight AJAX chat.
PHP
1
star
33

MyBB-Asset-Domain-Whitelist

Whitelists domains that can be used as asset (i.e. image) sources in threads, posts, signatures and private messages.
PHP
1
star
34

WebFix

Include for CSGO allowing proper usage of MOTD's without caching first URL visited.
SourcePawn
1
star
35

MyBB-Show-Referrals

Show Referrals By Rahul91
PHP
1
star
36

B-Tree-Container

C++ implementation of a multiple B-Tree container
C++
1
star
37

perl2python

Perl to Python syntax translator using regexp and perl to help make manual translation of Perl to Python easier.
Perl
1
star