GithubHelp home page GithubHelp logo

ninjayoto / fb-auto-reply-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ms-jahan/fb-auto-reply-py

0.0 0.0 0.0 62 KB

Auto reply to messages when anyone messages you on Facebook Messenger.

Python 100.00%

fb-auto-reply-py's Introduction

[THIS THING ISN'T WORKING EVERYTIME (fbchat module issue). USE IT IF YOU CAN DEBUG AND LET ME KNOW IF YOU CAN.]

Warning

(...from the fbchat module doc: ) We are not responsible if your account gets banned for spammy activities, such as sending lots of messages to people you don’t know, sending messages very quickly, sending spammy looking URLs, logging in and out very quickly… Be responsible Facebook citizens.

Features

  • Option for specific reply to specific or near specific messages.
  • Replies a specific message to every recipient whose messages aren't understood by the bot.
  • If anyone messages you twice which is not understood by bot, then secondary message system is available.
  • If primary and secondary messages are sent once to a recipient, then bot will not reply to the messages of the recipient anymore in an active session, but will reply to the messages which are recognised by the bot.
  • Waits for a random number (between 4 to 10) of seconds before sending every message to act as a human, to minimize the chance of getting blocked from Facebook.
  • Avoids group messages.
  • Blacklist option available if you want the bot not to respond to specific users.

Getting Started At A Glance

After cloning this repository, edit the msg1.txt, msg2.txt, received.txt, reply.txt and blacklist.txt files following the instructions written in them. Don't try to run the program without editing these files. You are definately gonna get error messages. Then, installed required modules from pip3 following the instructions below. Finally, run the run.py program, type your credentials when asked and you're good to go.

Installation

Make sure you have installed python3 in your machine. You can also use python2 by converting the whole code. Then:

  1. Clone this repository: git clone https://github.com/MS-Jahan/fb-auto-reply-py
  2. Run git clone --single-branch --branch v1 https://github.com/MS-Jahan/fbchat.git. You can delete other files and folders (cloned from my fbchat fork) except the fbchat folder. For Windows, you can just download the code (in zip file) for the code in branch v1.
  3. Install requirements: pip3 install -r requirements.txt --user
  4. Change directory to this project folder: cd fb-auto-reply-py
  5. Edit the msg1.txt, msg2.txt, received.txt, reply.txt and blacklist.txt files following the instructions written in them.
  6. Now run the script: python3 run.py
  7. Type your email and password when asked. Password will not be visible when typing. (You will not need to type your credentials next time if you don't change your password or log out from session )
  8. Now your bot is running!

Using on Android

To use this python tool on Android, you have to install a linux terminal emulator named Termux which is available on Google Play Store. After Installing Termux, open the app, write down the commands stated below one by one and press enter.

  1. Update and upgrade packages: apt update && apt upgrade (Press y and enter when prompted to upgrade packages.)
  2. Install python and git: apt install python git
  3. Get storage permission; Press Allow: termux-setup-storage
  4. Change directory to internal storage: cd /storage/emulated/0
  5. Clone this repository: git clone https://github.com/MS-Jahan/fb-auto-reply-py
  6. Install necessary python modules: pip3 install fbchat pygtail getpass --user
  7. Rename the downloaded project folder: mv 'fb-auto-reply-py' replybot
  8. Change directory to this project folder: cd replybot
  9. Edit the msg1.txt, msg2.txt, received.txt, reply.txt and blacklist.txt files using any text editor (or nano in Termux) following the instructions written in them.
  10. Now run the script: python3 run.py
  11. Type your email and password when asked. Password will not be visible when typing.
  12. Now your bot is running!

Reporting Issues

As I'm a noob in writing codes, this python tool may look sarcastic, even this README.md file. Feel free to open an issue for bugs, improvements, suggestions or anything important for developing this tool.

Credits

The main core of this project is the fbchat module. Without the module, it would be a very difficult task. I just read their doc and copied their example code and modified it for beginner users. ;-)

fb-auto-reply-py's People

Contributors

ms-jahan 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.