Giter Site home page Giter Site logo

Comments (4)

adilsond avatar adilsond commented on May 27, 2024 2

The results for december is back. But the problem now is for the current month. When I get all birthdays from december, all results from june is gone last month. Today, all results from june is back for 2022 but it erases all birthdays from july.

Now this bug makes this script useless :/

from fb2cal.

mobeigi avatar mobeigi commented on May 27, 2024 2

Not quite sure what Facebook is doing as it seems the offset logic is still quite broken but we can implement a workaround for now.

Previously we had the following code:
for offset_month in [1, 4, 7, 10]:

Which would give you the next 3 months of Birthdays starting from the current month. With 4 requests we got all the birthdays for the following year.

After the recent Facebook changes the query had odd logic for the offset_month.

As of July 2021:

0 July, Aug, Sept
1 Aug, Sept, Oct
2 Sept, Oct, Nov
3 Oct, Nov, Dec
4 Nov, Dec, Jan
5 Dec, Jan, Feb
6 Jan, Feb, March
7 Jan, Feb, March
8 Feb, March, April
9 March, April, May
10 April, May, June

Notice how the offset_months for 6 and 7 overlap (which is wrong). If you use the Facebook birthday page https://www.facebook.com/events/birthdays/ and scroll down enough you'll see that one month will be missing at the end of next year (in this case June 2022 is missing which is the offset 11 from July 2021).

So as a workaround we're going to do this and get some overlapping datasets at the expense of 1 extra request but we don't store duplicates in our set so the final result is correct.

# TODO: See #97, offset_month of 10 is needed here because offset months 6/7 are currently returning equivalent months
for offset_month in [0, 3, 6, 9, 10]:

Anyway, this has been fixed with a workaround in #103
It will may break again when Facebook changes their API again so we can make a new issue when that happens.

from fb2cal.

mobeigi avatar mobeigi commented on May 27, 2024 1

That is interesting, I just ran the script and can confirm what you see here (no December results).
The endpoint we use fetches the birthdays 3 months at a time but for Oct, Nov, Dec it seems to be skipping Dec.

Funnily enough the official Facebook page here also has the month of December missing:
https://www.facebook.com/events/birthdays/

So look like a new off by 1 bug Facebook introduced.
I've reported the bug to them, hopefully they can fix it.

from fb2cal.

axtck avatar axtck commented on May 27, 2024 1

Strange indeed, let we know if you get an answer!

from fb2cal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.