Automatic New Product Posting to Social Media

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Automatic New Product Posting to Social Media
Medium
~3-5 business days
FAQ

Our competencies:

Development stages

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1171
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1094
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    831
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    879
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    453

Implementing Automatic Posting of New Products to Social Media

When manager publishes product in catalog, system automatically distributes announcement to required channels: VKontakte, Telegram channel, Facebook Page, Odnoklassniki. Without manual copying, without delays, with correct formatting for each platform.

Architecture

Core — event-driven pipeline. Product publication generates ProductPublished event, which is picked up by separate listeners for each social network. Each listener queues task, worker processes independently.

ProductPublished event
    ├── VkPostListener → queue: vk-posts
    ├── TelegramPostListener → queue: telegram-posts
    ├── FacebookPostListener → queue: facebook-posts
    └── OdnoklassnikiPostListener → queue: ok-posts

Such scheme guarantees that failure in one network doesn't block posting to others.

VKontakte

Uses VK API v5.199. For publishing from community need community token with wall right. Photo upload — two-step: first get upload URL, then upload file and save.

// Step 1: get upload server
$uploadServer = $vk->photos->getWallUploadServer(['group_id' => $groupId]);

// Step 2: upload image
$uploaded = Http::attach('photo', file_get_contents($imageUrl), 'photo.jpg')
    ->post($uploadServer['upload_url']);

// Step 3: save photo
$saved = $vk->photos->saveWallPhoto([
    'group_id' => $groupId,
    'photo'    => $uploaded['photo'],
    'server'   => $uploaded['server'],
    'hash'     => $uploaded['hash'],
]);

// Step 4: publish post
$vk->wall->post([
    'owner_id'    => -$groupId,
    'message'     => $caption,
    'attachments' => "photo{$saved[0]['owner_id']}_{$saved[0]['id']}",
]);

Telegram

Telegram Bot API — simplest for integration. Method sendPhoto or sendMediaGroup for multiple photos. Caption supports HTML and MarkdownV2.

import httpx

async def post_to_telegram(bot_token: str, channel_id: str, photo_url: str, caption: str):
    async with httpx.AsyncClient() as client:
        resp = await client.post(
            f"https://api.telegram.org/bot{bot_token}/sendPhoto",
            json={
                "chat_id": channel_id,
                "photo": photo_url,
                "caption": caption,
                "parse_mode": "HTML",
            },
            timeout=15,
        )
        resp.raise_for_status()
        return resp.json()

Caption limit — 1024 characters. If description longer, sent as additional message via sendMessage with reply_to_message_id.

Facebook Page

Graph API v19.0, method /{page-id}/photos. Requires Page Access Token with pages_manage_posts right.

POST /v19.0/{page-id}/photos
  ?url=https://cdn.example.com/img.jpg
  &message=New product in catalog...
  &published=true

Text Templates

Different platforms require different formatting. Templates stored in database and editable via CMS:

Platform Features
VKontakte Up to 16k characters, emoji, clickable links
Telegram HTML tags <b>, <i>, <a>, limit 1024
Facebook Links in text — preview generated automatically

Template variables: {name}, {price}, {url}, {description}, {tags}.

Retry Logic and Monitoring

Each queue task has 3 attempts with exponential backoff (1 min → 5 min → 15 min). After exhausting attempts — entry in failed_social_posts table with error body and admin notification. Post metrics (success/fail per platform) displayed in dashboard.

Implementation Timeline

Integration of two platforms (VK + Telegram) — 4–6 business days. Each additional platform — 1–2 days. Admin panel with post history and templates — additional 2–3 days.