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

      Your FB Birthdays link is wrong. It’s supposed to be in this form:

      {
          url: 'webcal://www.facebook.com/ical/b.php?uid=YOUR_FB_UID&key=KEY_PROVIDED_BY_FB'
      }
      

      To find that address, follow these steps:

      • On Facebook, click on your Events link (usually from the left hand menu)
      • On the Events page, look at the bottom of the right hand side for the following block of links:
        0_1463979109347_fblinks.png
      • Hover over, and copy the link that reads ‘Birthdays’
      • Paste it in your config.js for MM.

      My config section for that is what you see above and it works just fine.

      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 robbythedude

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

        Your FB Birthdays link is wrong. It’s supposed to be in this form:

        {
            url: 'webcal://www.facebook.com/ical/b.php?uid=YOUR_FB_UID&key=KEY_PROVIDED_BY_FB'
        }
        

        To find that address, follow these steps:

        • On Facebook, click on your Events link (usually from the left hand menu)
        • On the Events page, look at the bottom of the right hand side for the following block of links:
          0_1463979109347_fblinks.png
        • Hover over, and copy the link that reads ‘Birthdays’
        • Paste it in your config.js for MM.

        My config section for that is what you see above and it works just fine.

        I’ve tried the webcal link as well, no luck. I’ve followed the steps you mentioned orignally, but that wasn’t working. I read on another post to try http instead of webcal. Neither work.

        What is really throwing me off is why would Facebook Upcoming Event’s URL work but NOT Facebook Birthday’s URL???

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

          Don’t know what to tell you, mine’s working just fine with the webcal address. Have you tried stripping everything and just putting that in, nothing else?

          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

            Shear curiosity, can you check the console logs, or simply run 'pm2 logs <YOUR_MM_PROCESS>' and see if there are any helpful messages about the calendar there, specifically the one that’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:

              Shear curiosity, can you check the console logs, or simply run 'pm2 logs <YOUR_MM_PROCESS>' and see if there are any helpful messages about the calendar there, specifically the one that’s failing …

              Nothing that looks wrong…
              Logs here: http://pastebin.com/3572PdeE

              The Keys and IDs are exactly the same between my Birthday and Upcoming Events URLs…The Calendar only outputs the Upcoming Events, gahhh

              Here is full config I’m using: http://pastebin.com/hDjMmTfa

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

                I’ve got the same issue. Was able import upcoming events but not birthdays.

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

                  I’ve been playing around with some stuff trying to figure this out and I noticed something…

                  Is it possible that my Upcoming Events Calendar is overwriting the Birthday Calendar?? When I download the ICS file from Facebook, both the Birthday and Upcoming Events ICS files have the same name! Named this: “u” + USERID + “.ics”

                  Possible that the MagicMirror is pulling down the ICS files, but overwriting each other because of same name?

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

                    I ran my Facebook Birhtday ICS file through this site: http://severinghaus.org/projects/icv/
                    Got this response: http://imgur.com/YW07yKU

                    Is this normal?

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

                      Both my Facebook calendar links are different. Birthdays contains a b.php and events is u.php. Tried birthdays by itself and still didn’t work.

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

                        For those of you who are having issues with your Facebook Birthdays calendar … if any of you want to PRIVATELY send me your actual link, I will stick it in my config and see what happens. Presumably it will fail the same way it is for you guys, but at least I’ll have something to test against since mine are working just fine. I don’t have a failed test case … I promise not to sell your information.

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

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

                          I think we sold our information the moment we signed up to Facebook. Happy to send you the link and see what happens.

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

                            I have Robby’s at the moment, trying to recreate the problem.

                            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 KirAsh4

                              Or maybe it’s because I’m trying to debug from the command line … as always …

                              Looks like Facebook is returning an ‘unsupported browser’ page when we try to fetch the data. Well aren’t they clever. Time to do some code massaging …

                              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

                                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

                                            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
                                            • 1 / 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