97
navitas
6y

I keep forgetting people's birthdays and thereby I forget to wish people, and wishing people everyday can become a chore. As somebody once said, if you do something more than once, automate it.

Spent two hours and ended up building a bot that consists of four functions: login, checkIfAuthenticated, postToProfile and getBirthdaysToday using mostly axios and cheerio.

Currently works perfectly and I've been thinking of writing a blog post about it for my 'Automating Your Life' series.

I'll post the link in the comments soon when I'm done with the blog post.

Comments
  • 5
    That sounds great. I'd love to read about it.
  • 5
    Would be nice if we could introduce multiple generic messages inorder to avoid getting caught.. The messages can be chosen at random for each wish.. I ve faced this problem and i completely stopped wishing anyone other than people from whom i expect wishes during my birthday.
  • 1
    @aEEEdev I actually have that in my implementation. This is just to show the bare basics of what it can do.
  • 5
    @aEEEdev Or you just get known for always saying, “Happy birthday, [name]!”, just like some us already do when we get around to sending a message.

    If anything, I’d be more worried that people find it creepy that you don’t miss any birthdays.

    Then again, I’ve also seen prople who deliberately enter wrong birthdays so they know who their real friends are (those that know the real date; I go by my middle name, so I judge people in a similar manner if they call me by my first name). And those stupid shared accounts where you never know if it’s the husband or the wife, and you’re likely to end up saying happy birthday to them on their anniversary, every year...
  • 1
    Put in random messages though, create a list of ten messages and choose one at random.
  • 3
    That smiley is in the wrong direction.
  • 0
    @Codex404 This is just the bare basics of it though ^^"
  • 1
    @creativeCoder It is still valid and still works.
  • 0
    Does it work?
  • 1
  • 1
    @MonkeyParade Just kidding with ya! Nice concept. You should start the blog :)
  • 0
    @MonkeyParade since fb highly discourage bots, good luck 🥺
  • 0
    @sunfishcc You must be fun at parties...

    Besides, there are countless articles on the Internet on how to automate aspects of Facebook.
  • 2
    This is something I want. Please share the link to implementation 😅
  • 0
    And what are you doing about 2 step verification
  • 0
    @TRex Right now, it doesn't work with 2 step authentication, but thanks for bring it up. I hadn't thought about it yet.

    Since all the login function really does is emulate the login request and grab the cookies, you could just manually feed the cookies yourself and it should work.
  • 1
    If I were to do this. Everyone, including Facebook, would think my account was hacked!
  • 1
    This is nice! Can you add sendPrivateMessage aside from postToProfile?
  • 1
    @nikolatesla I actually did a variation that did that using existing modules a few months ago.

    https://gist.github.com/ishan-marik...
  • 1
    @MonkeyParade nice concept. dropping my comments here so that i can be notified about your blog
  • 1
    @rutee07 I'm just glad to hear that I'm not the only one that can't remember the birthdays of his relatives ^^'
  • 1
    @rutee07 the side effect of learning and knowing so many things as a dev.
  • 2
    which package are you using for Facebook?
  • 1
    @nothappy I'm not using any other packages besides cheerio and axios (and a couple of other helper modules like tough-cookie).
  • 1
    @MonkeyParade then please publish your package
  • 1
    @nothappy I don't think I'll be releasing it as a module, but there will soon be a blog article about it.
  • 1
    This would be a whole lot simpler if you'd just kept your tagline as "Advance Happy birthday to everyone (I'm lazy)"
  • 0
    This is great until you accidentally say happy birthday to an ex or a diseased person
  • 0
    We should send feature request to Facebook
  • 0
    @avasconcelos114 well there is a dutch politician who has done that about ten times already.
  • 0
    Only in India
  • 0
    @electrineer only in India does what happen?
  • 0
    @MonkeyParade that people think it's a good idea to have a bot send meaningless wishes to their friend list. It's the same as sending them a reminder that it's their birthday.

    In my culture you only do that if the day has enough meaning to you that you actually know and remember it. But I've heard that it's also common in India to send meaningless messages every morning. I know next to nothing about Indian culture, though.
  • 0
    @electrineer I'm not Indian but if you know next to nothing about a culture, you should probably shut up about it without letting your ignorance show.

    In my culture, cake days don't really bear much importance. We wish people regardless of how close they are to us. For the ones actually close to us, we do something that is more meaningful.
  • 0
    @MonkeyParade one never gets rid of their ignorance if they shut up. Last time I read a rant about a person with script for the same purpose as yours they were from India.
  • 0
    @electrineer The only reason I did it was because a regular on an IRC channel I frequent asked if something like this was possible and I wanted to see if I *could* do it.

    .. also you can shove your assumptions up your arse (:
  • 0
    @MonkeyParade k
  • 0
    Blog post!!
    Did you use requests or Graph api?
  • 0
    Just dropping a comment for follow up on the birthday bot.
  • 3
    Back when I still used Facebook I had a birthday when absolutely nobody wished me a happy birthday. Not a single fucking person, even though Facebook fucking reminds people. God that was depressing.
Add Comment