Social media is now an essential part of internet marketing and if you run a blog on WordPress then the chances are you have a Twitter account to help drive traffic to your site and promote content. If your website has a healthy following, you may like to use it as a platform to attract more followers on Twitter. This can be done by using social sharing buttons, as we have explored in the past, but also by adding a Twitter timeline to your site.
A timeline will give visitors a glimpse of your recent Twitter activity and presents a good way of keeping content on your site fresh when you are not posting. Let’s take a look at how to get a timeline on your WordPress site.
Getting OAuth Authentication
Before setting about getting a timeline on your site, you will first need to get OAuth authentication from Twitter. OAuth API v1.1 has recently been updated and came into effect on June 11, 2013, meaning any code utilising older API will not be supported.
To gain authentication, you will need to visit https://dev.twitter.com/apps/ and sign in using your Twitter credentials.
Next, select “Create new application” and provide application details. These will include name and description (do not use the word “Twitter”), your website URL (make sure to include http:// before it) and a callback URL (this can be left blank).
Once the details have been entered, fill in the CAPTCHA and click on “Create.” You will then be taken to another page, where you will need to select “Create my access token,” and make a note of the Consumer Key and Consumer Secret. You will need these when installing your timeline.
Installing a timeline
As always, a Twitter timeline can be created manually or by using a plugin. However, the latter is a much easier process, especially after the recent API v1.1 update. There is no shortage of Twitter stream plugins in the WordPress plugin directory: Rotating Tweets, Multi Twitter Stream and Garee’s Twitter Stream are good options, but Twitter Stream by Paul Robinson is my preferred choice.
Twitter Stream is simple and effective and fully up-to-date with the latest API v1.1. To install this plugin, go to Plugins > Add New in your WordPress dashboard and enter “Twitter Stream” in the search box. Once you’ve found it click on “Install Now” and then “Activate Plugin” on the installation page.
Twitter Stream will now appear in your Widgets are and can be dragged and dropped to the appropriate sidebar. To configure the plugin, enter a Title (i.e. Latest Tweets) your Twitter username, how many Tweets you wish to show, and whether or not you wish to show Retweets and followers – the remaining options can be left blank. Click on “Save” to store your preferences and go to Settings > Twitter Stream get the timeline authorised.
In the plugin settings, you will see boxes for “Consumer Key” and “Consumer Secret”; enter the codes that you made a note off and the app authorized.
With this done, you can now go to the front-end of your site and see your most recent tweets displayed.