Install nltk module and fbchat then run Main.py and put your facebook username and password when asked for the first time you need to wait until it trains on your facebook messages so type y when asked. now run Main.py and it will reply to your friends automatically based on your old messages.