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.
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 find the extension in the TER.