Skip to content

noidee-dev/social2news

Repository files navigation

social2news

Imports Instagram, Facebook and YouTube posts into TYPO3 as EXT:news records — one news type per platform.

What it does

social2news fetches recent posts from a configured social source and creates or updates corresponding tx_news_domain_model_news records on a chosen storage page. Each platform gets its own news type/model:

  • Instagram → NewsInstagram
  • Facebook → NewsFacebook
  • YouTube → NewsYoutube

Media referenced by a post (images/video thumbnails) is downloaded to a local storage path and attached to the created news record. Repeated imports are idempotent: posts already imported are updated rather than duplicated.

Requirements

  • TYPO3 v13.4
  • PHP 8.2+
  • georgringer/news ^12.3
  • svenpetersen/instagram ^4.0 (Instagram API client; a valid feed/access token must be configured there for the Instagram source to work)

Configuration

Extension configuration is set under Admin Tools → Settings → Extension Configuration → social2news (or directly in config/system/settings.php under EXTENSIONS.social2news). Keys, from ext_conf_template.txt:

Key Description Where to get it
instagramUserId Instagram Business User-ID Instagram Graph API (Business Login / Facebook App linked to the Instagram Business account)
instagramUsername Instagram username (optional, used for author display)
instagramToken Instagram long-lived access token Instagram Graph API long-lived token exchange
facebookPageId Facebook Page ID Facebook Graph API (the page's numeric ID)
facebookAccessToken Facebook Page access token Facebook Graph API Page token (Meta for Developers, page access token with pages_read_engagement)
youtubeApiKey YouTube Data API v3 key Google Cloud Console → YouTube Data API v3 → API key
youtubeChannelId Default YouTube channel ID YouTube channel's UC… ID
localFileStoragePath Filesystem path for downloaded media (default /public/fileadmin/social)

Usage

vendor/bin/typo3 social2news:import <source> <identifier> <storagePid> [limit=25]
  • sourceinstagram, facebook, or youtube
  • identifier — Instagram User-ID / Facebook Page-ID / YouTube Channel-ID
  • storagePid — page ID where the created/updated news records are stored
  • limit — maximum number of posts to fetch (optional, default 25)

Examples:

# Instagram
vendor/bin/typo3 social2news:import instagram 17841400000000000 42 25

# Facebook
vendor/bin/typo3 social2news:import facebook 123456789012345 42 25

# YouTube
vendor/bin/typo3 social2news:import youtube UC_x5XG1OV2P6uZZ5FSM9Ttw 42 10

The command can be run as a Scheduler task (console-command task) for scheduled/automated imports.

Attribution

social2news is derived from dauskonzept/instagram2news by Dauskonzept GmbH (GPL-2.0-or-later), extended to support Facebook and YouTube as additional sources alongside Instagram. The Instagram API client is provided by svenpetersen/instagram.

License

GPL-2.0-or-later — see LICENSE.

About

Import Instagram, Facebook and YouTube posts as TYPO3 EXT:news records

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages