MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Calendar Module - Unable to load Facebook Birthdays

    Scheduled Pinned Locked Moved Solved Troubleshooting
    29 Posts 7 Posters 27.6k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KirAsh4K Offline
      KirAsh4 Moderator
      last edited by

      So here’s the fun part … mine was working. Because I hadn’t gone a 'git pull' in a while on my dev tree, so I never saw the change. Now that I am current, it’s not working. So, none of you are any more crazy than we all are, it really isn’t working. I’m running some debugging and trying to figure out where and why it’s failing.

      A Life? Cool! Where can I download one of those from?

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        robbythedude @KirAsh4
        last edited by

        @KirAsh4 said in Calendar Module - Unable to load Facebook Birthdays:

        So here’s the fun part … mine was working. Because I hadn’t gone a 'git pull' in a while on my dev tree, so I never saw the change. Now that I am current, it’s not working. So, none of you are any more crazy than we all are, it really isn’t working. I’m running some debugging and trying to figure out where and why it’s failing.

        We’ll have to recruit more QA peeps for future commits! :P haha

        1 Reply Last reply Reply Quote 0
        • KirAsh4K Offline
          KirAsh4 Moderator
          last edited by KirAsh4

          Yeah, not as easy as it sounds. For those who enjoy seeing the nitty gritty, this is what happens with the various calendar payloads and you can clearly see the FB one failing:

          0_1464205641397_huh.png

          Working on trying to figure out why since it does work from the command line, but not in browser.

          A Life? Cool! Where can I download one of those from?

          R 1 Reply Last reply Reply Quote 0
          • R Offline
            robbythedude @KirAsh4
            last edited by

            @KirAsh4 said in Calendar Module - Unable to load Facebook Birthdays:

            Yeah, not as easy as it sounds. For those who enjoy seeing the nitty gritty, this is what happens with the various calendar payloads and you can clearly see the FB one failing:

            Working on trying to figure out why since it does work from the command line, but not in browser.

            What is the tool you’re using in that screenshot to test this out?

            1 Reply Last reply Reply Quote 0
            • KirAsh4K Offline
              KirAsh4 Moderator
              last edited by

              Firebug extension in Firefox. Though most browsers have a basic console output if you just hit F12. And the data that you see there is normally not visible. I added those output streams in my dev tree so I can see what’s going on.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • KirAsh4K Offline
                KirAsh4 Moderator
                last edited by

                Ok, I need some testers … this is working for me with a small change in our fetcher code. So, for those willing to try, please following these steps:

                Step 1
                Navigate to the 'MagicMirror/modules/default/calendar/' folder

                Step 2
                Open the 'calendarfetcher.js' file in your favorite editor and look for the following line and delete it:

                ical.fromURL(url, {}, function(err, data) {
                

                Step 3
                After deleting that line, in its place you’re going to paste in the following snippet of code:

                    var opts = {
                        headers: {
                            'User-Agent': 'Mozilla/5.0 (Node.js 6.0.0) MagicMirror/2.0 (https://github.com/MichMich/MagicMirror)'
                        }
                    }
                    ical.fromURL(url, opts, function(err, data) {
                

                Please note that very last line, it’s almost identical to the one you deleted. Only one piece changed and you must put that line in as modified above!

                Step 4
                Save and close the file, and relaunch your MM process.

                Step 5
                Report back to me.

                On my setup, it’s working. I’m getting this in my calendar now. (The names you see are birthdays, I simply have a filter to remove 's birthday' form the string that Facebook returns.)

                0_1464373194299_bdays.png

                A Life? Cool! Where can I download one of those from?

                R 1 Reply Last reply Reply Quote 0
                • KirAsh4K Offline
                  KirAsh4 Moderator
                  last edited by

                  Got home, did a full reset on my dev tree, added the above code piece and this is what I get. Waiting on more confirmation from others before I push this up to the main repo.

                  0_1464390609193_bdays.png

                  A Life? Cool! Where can I download one of those from?

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    robbythedude @KirAsh4
                    last edited by

                    @KirAsh4 said in Calendar Module - Unable to load Facebook Birthdays:

                    Ok, I need some testers … this is working for me with a small change in our fetcher code. So, for those willing to try, please following these steps:

                    Step 1
                    Navigate to the 'MagicMirror/modules/default/calendar/' folder

                    Step 2
                    Open the 'calendarfetcher.js' file in your favorite editor and look for the following line and delete it:

                    ical.fromURL(url, {}, function(err, data) {
                    

                    Step 3
                    After deleting that line, in its place you’re going to paste in the following snippet of code:

                        var opts = {
                            headers: {
                                'User-Agent': 'Mozilla/5.0 (Node.js 6.0.0) MagicMirror/2.0 (https://github.com/MichMich/MagicMirror)'
                            }
                        }
                        ical.fromURL(url, opts, function(err, data) {
                    

                    Please note that very last line, it’s almost identical to the one you deleted. Only one piece changed and you must put that line in as modified above!

                    Step 4
                    Save and close the file, and relaunch your MM process.

                    Step 5
                    Report back to me.

                    On my setup, it’s working. I’m getting this in my calendar now. (The names you see are birthdays, I simply have a filter to remove 's birthday' form the string that Facebook returns.)

                    Made these changes, we are good! Works now :dark_sunglasses: Thank you so much for all the help.

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      andy952
                      last edited by

                      Doesn’t seem to fix it for me :/

                      KirAsh4K 1 Reply Last reply Reply Quote 0
                      • KirAsh4K Offline
                        KirAsh4 Moderator @andy952
                        last edited by

                        @andy952, can you send me your calendar link privately and I’ll test it out on my system, see if I find any errors.

                        A Life? Cool! Where can I download one of those from?

                        1 Reply Last reply Reply Quote 0
                        • pugslyP Offline
                          pugsly
                          last edited by

                          this fixes the problem for me as well.

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            squidsmarks
                            last edited by

                            Awesome! Facebook birthdays and events are working again :)
                            Thanks for your help.

                            1 Reply Last reply Reply Quote 0
                            • KirAsh4K Offline
                              KirAsh4 Moderator
                              last edited by

                              With the majority of you saying it’s working with the above change, I went ahead and made a pull request against the branch. When @MichMich has time, he’ll review and merge. I’m still waiting to hear from @andy952 to see if there still is a problem.

                              A Life? Cool! Where can I download one of those from?

                              MichMichM 1 Reply Last reply Reply Quote 0
                              • MichMichM Offline
                                MichMich @KirAsh4
                                last edited by

                                @KirAsh4 Just got back from my holiday. Almost ready to merge your PR. One small issue: see GitHub.

                                1 Reply Last reply Reply Quote 0
                                • H Offline
                                  HK
                                  last edited by

                                  I am not sure if Facebook has revoked the privileges to export the birthday calendar or we had a misunderstanding in this issue discussion.

                                  I went through all suggested changes to make it work for my fb birthday calendar and after spending alot of time, i realized that i can if i add facebook URL as suggested in this article. it shows me events (which i selected to be interested/going) . However, birthday calendar doesn’t shows up on my mirror.

                                  Let me know if i missed anything or guide me to make facebook birthday work for my mirror.

                                  Thanks in advance !!

                                  1 Reply Last reply Reply Quote 0

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  • 1
                                  • 2
                                  • 2 / 2
                                  • First post
                                    Last post
                                  Enjoying MagicMirror? Please consider a donation!
                                  MagicMirror created by Michael Teeuw.
                                  Forum managed by Sam, technical setup by Karsten.
                                  This forum is using NodeBB as its core | Contributors
                                  Contact | Privacy Policy