Skip to content

Automatically post news to Twitter and Facebook and fetch the number of Likes and Followers

We switched a news site from Wordpress to TYPO3. This site used a plugin for Wordpress to automatically publish new tx_news posts to Facebook and Twitter. So we needed a solution to do the same in TYPO3: rx_scheduled_social

The publishing of news must happen independent of any user interaction. As soon as a news post goes live it has to be published on the social media channels as well. This publish date is often configured with the "start date" of news to plan the release of certain article for the future. For that reason the required functionality was implemented in a scheduler task (the name of the extension is rx_scheduled_social).

For each social network a separate task is available (currently supported are Twitter and Facebook). The configuration options are the necessary access keys for the network and a more detailed specification what news posts should be posted with this task (so different categories can be posted to different accounts).

The scheduler task is executed with a given frequency (what a surprise) and queries for news that not have been posted yet and are currently visible to the public. For each post the correct link is generated and the title and the link to the news post are submitted to the social network.

Likes and Followers

For the site in question, another functionality was required: Show the number of likes of the Facebook page and the number of followers of the Twitter account.

Sure you can use the SDKs of the social networks to display this information but it relies on Javascript and exposes each user of the site to the social networks. So we added another type of scheduler task that fetches the information and stores it in the registry. With a ViewHelper the number is fetched in the template and can be presented to the user.

This extension is tailored to our own requirements and most changes require changing the PHP files. If you are searching for an extension to automatically post to Twitter and Facebook you can <link https: typo3.org extensions repository view rx_scheduled_social>find the extension in the TER.