If you’re a keen, regular or prolific creator of content on your Textpattern CMS site, you also have a presence on social media outlets. For this article, I’m going to demonstrate how to connect Textpattern with Twitterfeed, a free service from Bitly that automates posting to a number of social media services from RSS feeds. As the name implies, the Twitterfeed service can post to Twitter, but it can also send your stuff to Facebook, LinkedIn and App.Net, too. For this walkthrough, I’ll be showing you how to post to Twitter, but a similar process applies to the other services.
The aim of this exercise is to have articles posted to Twitter. This assumes the articles are in the section called articles, and no other posts will be sent to Twitter. Should you wish to send everything you post up to social media, there’s a crucial decision to make at the get-go: the feed. In my two previous articles, I talked about RSS feeds and their URL format. To recap, the URL for the RSS feed of the articles section is:
…where example.com is your Textpattern site URL. Should you choose to send all of your content up the tubes, the feed URL is
Note the lack of ?section=articles component in the URL. I’m deliberately restricting my postings to just the articles section, so I’m going to use the first URL as my source.
To start off, before even visiting Twitterfeed or Twitter, check the validity of your feed. This is important. I use FeedValidator for my checks, it’s established and I trust it. Check your chosen feed is valid:
If you have problems, they might come from illegal characters in your posts, or something else that you can rectify. When you have the approval that your feed is valid, you’re good to proceed. Next, select the Twitter account you want to use for your posts, whether it’s a new or existing account. Log in to that account. Now, go to TwitterFeed and log in – create an account if you need one. Enter your new feed name and Textpattern RSS feed URL:
Continue to step 2 and select Twitter from the list:
Click the blue button to authenticate with Twitter:
Note that you won’t need to enter your Twitter username and password here, Twitter uses OAuth to keep that information secure. Click the blue Authorize app to confirm you want TwitterFeed to be able to post to your Twitter account:
You will be taken back to TwitterFeed, where your Twitter account will now show as authenticated:
Click Create Service to confirm, then click All Done! to finish. From now, when you post a new article to the article section, a link will be posted to Twitter.
Here’s my Twitter account before I attached the TwitterFeed function:
After writing two articles, both appear in my TwitterFeed dashboard:
…and both have been posted to Twitter automatically:
Note that the TwitterFeed service checks every 30 minutes by default, so you may experience a short delay from posting to your article to seeing it live on Twitter, etc. You can expedite this process by clicking check now! on the right side of the Twitterfeed dashboard.
Next time: how to get Textpattern and IFTTT talking.