Giter Site home page Giter Site logo

facebook-birthday-bot's Introduction

Facebook Birthday Bot

Never forget a facebook friends birthday ever again.

This script will check your facebook notifications for birthdays, and automatically write a message to that friends wall.

Dependencies

pip install robobrowser

How it works.

>>> from fb_bday_bot import facebookBirthdayBot as fbot

# Launch the birthday bot in a single line.
>>> fbot(username, password).start()

# Logging is inactive by default.
# To change logging pass the keyword arguments log and logfile.
# Log is a boolean that turns logging on and off.
# Logfile determines whether or not a logfile is written in the working directory.
>>> fbot(username, password, log=True, logfile=True).start()

# The bot will randomly choose from a list of default messages.
# But you can use your own message(s) by assigning a list of strings to the messages keyword argument.
>>> my_msgs = ['Hi there, hope you have a great birthday!']
>>> fbot(username, password, messages=my_msgs).start()

You can get an instance of the bot and trigger each stage individually.

>>> from fb_bday_bot import facebookBirthdayBot as fbot

# Get an instance of the class.
>>> my_bot = fbot(username, password)

# Open facebook.
>>> my_bot.open_page()

# Log into facebook using the credentials passed to fbot.
>>>my_bot.login()

# Get a list of birthday notifications as html anchor tags.
# Returns None if no birthday's are found.
>>> links = my_bot.get_birthday_notifications()

# You can check to see if a link is from today.
# You don't need to check this if you're using the send_greetings method
>>> link_valid(links[0])
True

# Sending the birthday message(s) using the links
>>> send_greetings(links)

The script can be called from a batch file like the one below. Do not run it more than once a day, or you will send duplicate messages.

@ECHO OFF
@start pythonw.exe C:\PythonScripts\fb_bday_bot.py logon_email logon_password

facebook-birthday-bot's People

Contributors

thomas-rudge avatar tommyod avatar

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.