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:
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
- 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
: - Link application with group created on the previous step:
- Get
access_token
using Implicit Flow:
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
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
-
Create account on the facebook, or use existing
-
Register as a developer
-
Using Facebook Graph API Explorer, get access token with
publish_to_groups
- permission: -
Add the following records to the
.env-file
:FACEBOOK_TOKEN=Your Facebook token FACEBOOK_GROUP=Your Facebook group id
python reposting.py <path_to_img file> <post message>
The code is written for educational purposes on online-course for web-developers dvmn.org.