/facebook-groups-post-bot

Python bot for create text posts in facebook groups where you already are a member.

Primary LanguagePythonMIT LicenseMIT

MIT License Linkedin Telegram Github Fiverr Discord Gmail Twitch


Facebook Groups Post Bot

Facebook Groups Post Bot

Python bot for create text posts in facebook groups where you already are a member. Project type: personal


Table of Contents
  1. Build With
  2. Media
  3. Details
  4. Install
  5. Settings
  6. Run
  7. Roadmap

Build with

Python Selenium

Details

This project have two scripts save_groups.py post_groups.py

The save_groups.py script is used to save the groups where you are a member in the data.json, searching them with specific keyword. This script is useful if you want to post in a lot of groups, because you can save the groups in the json file and use it in the post_groups.py script.

The post_groups.py script is used to post in spcific groups. In the data.json file you can save the groups where you want to post, and the script will post in all of them (a random post each time)

Warning: This script is not for spamming groups, is for post in groups where you are a member, and you want to post in a lot of groups at the same time. I am not responsible for the use that you give to this script.

Install

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/darideveloper/facebook-groups-post-bot.git
  2. Install python packages (opening a terminal in the project folder)

    python -m pip install -r requirements.txt 
  3. Create a .env file and data.json file in the project folder.

Settings

Update your chrome path in the .env file (note: the chrome path is the folder where chrome data its installed)

CHROME_PATH = C:Users<<your-user-name>>AppDataLocalGoogleChromeUser Data

Run

  1. Before run the scripts, you need to login in your facebook account in chrome

  2. (optional) Open the save_groups.py script with a code/text editor, and replace the "keyword" for search groups in the line 3

    keyword = "python" # sample for search group where you are a member, about python
  3. (optional) Run the save_groups.py script

    python __save_groups__.py
  4. Open the "data.json" file, and add the groups where you want to post, and the text of the post in the "text" field

        {
        "posts": [
            {
                "text": "text post 1",
                "image": "{image path}"
            },
            {
                "text": "text post 2",
                "image": "{image path}"
            },
            {
                "text": "text post 3",
                "image": ""
            },
        ],
        "groups": [
            "https://www.facebook.com/groups/sample-group-1/",
            "https://www.facebook.com/groups/sample-group-2/",
            "https://www.facebook.com/groups/sample-group-3/",
            "https://www.facebook.com/groups/sample-group-4/",
            "https://www.facebook.com/groups/sample-group-5/",
            "https://www.facebook.com/groups/sample-group-6/",
            "https://www.facebook.com/groups/sample-group-7/",
            "https://www.facebook.com/groups/sample-group-8/"
        ]
    }
  5. Run the post_groups.py script

    python __post_groups__.py
  6. Wait until the script finish, and enjoy your posts in the groups :

Roadmap

  • Get all groups where you are a member related to a keyword
  • Single post per group
  • Choose a random post each time
  • Optional image in posts