After you have enabled this Bundle, there are some global steps to define.
If you don't have any pimcore data object to manage your social posts, you need to create it first. After that, you need to tell SocialDataBundle about it:
# config/packages/social_data.yaml
social_data:
social_post_data_class: SocialPost
The Data Class needs to provide some predefined fields and needs to implement the SocialPostInterface
.
Just import the preconfigured SocialPost Definition
to kickstart your data class.
You can check the Health state by visiting the Social Data Menu "Settings"
=> "Social Data"
=> "Connector Configuration"
.
Watch out for this information:
This is the final step: Setup your Connectors. Each connector has its own configuration and strategies. Lets checkout the Connector Guide to learn how to use and install them.
To crawl periodically your newest social data, you need to install a new cron task. In this example we dispatch our processor every six hours. You can of course adjust this to your needs, but you should always keep in mind that limit-timeouts may occur if the crawl intervals are very short.
0 */6 * * * /usr/bin/php PATH/TO/bin/console social-data:fetch:social-posts
If you don't want to install additional cronjobs, you may want to enable the import process via maintenance task. This task is disabled by default, so you need to enable it first:
# config/packages/social_data.yaml
social_data:
maintenance:
fetch_social_post:
enabled: true # enable task, default false
interval_in_hours: 3 # dispatch every 3 hours, default 6
Sometimes you may want to remove outdated posts. It's possible to delete posts (and optionally also the poster) by maintenance task. This task is disabled by default, so you need to enable it first:
# config/packages/social_data.yaml
social_data:
maintenance:
clean_up_old_posts:
enabled: true # enable task, default false
expiration_days: 10 # delete posts older than 10 days, default 150
delete_poster: true # also deletes poster asset if given, default false
After you have successfully configured your required connectors you're now able to finally add some walls. Ready? Read more about it here