comtocode / ctc-socialnetworkimportbundle
There is no license information available for the latest version (v1.0.11) of this package.
This bundle is used to import social feeds (facebook, twitter, instagram, youtube,...) into Ibexa DXP content
Package info
gitlab.com/comtocode-dev/ctc-socialnetworkimportbundle
Type:ibexa-bundle
pkg:composer/comtocode/ctc-socialnetworkimportbundle
v1.0.11
2022-12-19 08:52 UTC
Requires
- php: ^7.1
- ext-json: *
- facebook/php-business-sdk: ^8.0.3
- symfony/http-client: ^5.4
This package is auto-updated.
Last update: 2026-03-24 08:48:14 UTC
README
This bundle is used to import social feeds (Facebook, Twitter, Instagram, YouTube, ...) into Ibexa DXP 5 content.
Requirements
- PHP >= 8.2
- Ibexa DXP 5.x
- Symfony 7.x
Installation
composer require comtocode/ctc-socialnetworkimportbundle
Register the bundle in config/bundles.php:
return [
// ...
CTC\SocialNetworkImportBundle\CTCSocialNetworkImportBundle::class => ['all' => true],
];
Configuration
Add your configuration in config/packages/ctc_social_network_import.yaml:
ctc_social_network_import:
params:
storageDir: "%kernel.project_dir%/var/import"
limit: 10
parentLocationId: 2
contentType: "social_network"
language: "fre-FR"
services_enabled:
- facebook
- twitter
- instagram
- youtube
services_list:
facebook:
# ...
twitter:
# ...
instagram:
# ...
youtube:
# ...
Usage
Import feeds
php bin/console ctc:sn:import
Available options:
--dry-run=true— test the app without writing anything--social=NETWORK_NAME— import a specific social feed only--import-only=true— get feeds but do not create Ibexa content
Delete imported content
php bin/console ctc:sn:delete_subtree
Twig functions
{# Get live feed with pagination #}
{% set feed = getLiveFeed(1, 10) %}
{# Get a specific social item #}
{% set item = getSocialItem('twitter') %}
Migration from eZ Platform 2.5
This version has been fully migrated to Ibexa DXP 5 / Symfony 7:
- All
eZ\Publish\*namespaces replaced withIbexa\*equivalents ContainerAwareCommandreplaced with proper dependency injection\Twig_Extensionreplaced withTwig\Extension\AbstractExtensionTreeBuilderAPI updated for Symfony 7 compatibility- Service definitions modernized (FQCN service IDs, no container parameters for classes)
- PHP 8.2+ features (typed properties, constructor promotion,
matchexpressions,staticreturn types) services.ymlrenamed toservices.yamleZSNUtilsrenamed toIbexaSNUtils- All
$container->get()/getContainer()calls removed in favor of constructor injection execute()methods returnint(Symfony Console requirement)#[AsCommand]PHP attribute used for command registration