Smm-reposting

Using this script, you can make automatic posting at the same time to the next services:

The script uses following external API's:

If everything is fine, you'll see a new post in your vk ,facebook and telegram groups:

1.png

How to install

Python3 should be already installed.

$ git clone https://github.com/nicko858/smm-reposting.git
$ cd smm-reposting
$ pip install -r requirements.txt
  • Create file .env in the script directory

VK instructions

  • Create account on the vk.com, or use existing
  • Create fan-group where you are going to post - vk group management
  • Register new application following this link
  • Make sure, that application is turned on and remember it's application_id: 023.png
  • Link application with group created on the previous step: 024.png
  • Get access_token using Implicit Flow:

025.png

and remember it

  • Add the following records to the .env-file:

    APP_ID=Your application_id
    VK_ACCESS_TOKEN=Your access token
    VK_GROUP_ID=Your vk_group_id

Telegram instructions

You have to create telegram-channel, telegram-bot and get access-token. This arcticle will helps you to do all of this things. If everything is fine, you'll get telegram_bot_token, telegram_bot_url and telegram_channel_name.
Add the following records to the .env-file:

TELEGRAM_BOT_TOKEN=Your bot token
TELEGRAM_BOT_URL=Your bot address
TELEGRAM_CHANNEL_NAME=Your telegram channel

Facebook instructions

  • Create account on the facebook, or use existing

  • Create fan-group where you are going to post - 2.png

  • Register as a developer

  • Create a new application - 3.png

  • Using Facebook Graph API Explorer, get access token with publish_to_groups - permission: 4.png

  • Add the following records to the .env-file:

      FACEBOOK_TOKEN=Your Facebook token
      FACEBOOK_GROUP=Your Facebook group id

How to run

    python reposting.py <path_to_img file> <post message>

Project Goals

The code is written for educational purposes on online-course for web-developers dvmn.org.