A social media bot, capable of posting to Instagram and Whatsapp!
Explore the docs »
View Demo
·
Icon
Table of Contents
The HKA Social Media Bot is a tool capable of posting images and messages to various social media websites. Keep your workflow steady with scheduled posts and automatic image generation!
-
Creating a new virtual environment
This app is built on Flask, which recommends creating a new conda environment
conda create -n socialmediabotEnv python=3.9.7 anaconda conda activate socialmediabotEnv
Note If you have closed your terminal window, you can reactivate your virtual environment by typing
conda activate socialmediabotEnv
again -
Clone the repo
git clone https://github.com/mirkosprojects/socialmedia-bot.git
-
Install dependencies
cd socialmedia-bot pip install -r requirements.txt
For more information about the dependencies see requirements
HOW TO CREATE OR CONVERT TO A FACEBOOK BUSINESS ACCOUNT
HOW TO CREATE OR CONVERT TO AN INSTAGRAM BUSINESS ACCOUNT
HOW TO LINK WHATSAPP AND INSTAGRAM ACCOUNTS TO FACEBOOK
HOW TO ADD FACEBOOK APP TO ACCOUNT AND RECEIVE ACCESS TOKEN
- Starting the app
Once the app has started, it will output an ip adress (usually 127.0.0.1:5000), copy and paste it in your browser
python main.py
You will be redirected to a Login Page, create a new user account and log in with your email and password.
Note The website is running locally on your machine. Email adresses and passwords are stored in a local database at
socialmedia-bot/instance/database.db
You will have to update your credentials.
Go to Settings
→ Whatsapp
, enter your access token and phone number and click Update
.
Repeat this step with your other social media accounts.
Sending messages to whatsapp contacts requires their phone number.
Go to Settings
→ Contacts
and enter the contacts, you wish to message through whatsapp.
Go back to Home
and type in a text, you wish to post.
Add an image to the post by clicking on Select File
or drag and drop it.
Select the websites, you wish to post to and click on Post
.
Note You can have up to 1000 free whatsapp conversations per month, for more information about pricing, see pricing
Note You can post up to 25 pictures on instagram per day
Warning In order to post an image through the Graph-API, this program publishes the image on imgbox.com. This means, your photos will be available on the internet, even after you delete them from Instagram.
You can run this application locally on your network, start it as follows
python main.py --host=0.0.0.0
Any other device on the network can now open the website by typing the returned ip adress.
Note The default port is 5000. In some cases this port might be used by different applications. You can specify a different port with the
--port
argument
Warning Multiple users shouldn't access the same account simultaneously
Cloud hosting providers like DigitalOcean can host websites for you, making your app available on the internet.
Warning Additional security measures might need to be implemented
- Proof of Concept
- Snapchat
- Webapp
- Rewrite as webapp using Flask
- HTML GUI
- Database
- password access
- storing contacts
- storing posts
- Publishing to the internet
- Security improvements
- Deploy using Digital Ocean or other webhost
- Publishing the facebook app
- Image Generator using templates
- Scheduling Posts
Distributed under the MIT License. See LICENSE for more information.