Authenticate Your Twitter API Calls Before March

12

Twitter API OAuth

On the 5th of March, Twitter is going to retire version 1 of its API. The replacement, version 1.1 is very similar, but with one major difference; every single call must be authenticated.

This means that come March, your existing API calls will break; including simple things like displaying tweets on your site. To fix this, you need to move to the new v1.1 API, and authenticate with Twitter.

Read More »

Add a Backup to Embedded Tweets in WordPress

44

Tweets in WordPress with Backups

Around this time last year, I showed you how to embed tweets in WordPress using the Twitter API.

Today, I want to improve on that script by adding a backup to it. Twitter is often down or unresponsive, and when it is, the previous script fails and displays nothing.

With a backup, we store an extra copy of each set of tweets that we find. When Twitter is down, we can then use this backup to display tweets as normal.

Read More »

How to Get Facebook, Twitter, and RSS Counts {WP}

124

Twitter, Facebook, RSS Counts

You will have seen blogs showcase their Twitter, Facebook, and RSS counts with typography. With these numbers in plain text, you can style them into your website far more effectively than if you were to use the old-fashioned “chicklets.”

Twitter and Facebook make this easy, but you’ll need to take an extra step with FeedBurner first. Log in, then click Publicize > Awareness API, and click activate.

All set? Then let’s get started!

Read More »

How to Use the Twitter API in WordPress

84

Twitter with WordPress

There are plenty of Twitter plugins for WordPress. Why would we want to make our own script?

Well, most of the plugins come with a lot of fluff you just don’t need. Ours will be simple and efficient; all it needs to do is grab your tweets and display them.

The other reason is control; you write the markup, so it’s entirely up to you how it is displayed.

The last reason is that because we’re getting the tweets directly from the Twitter API feeds (i.e. no verification is going to be needed), we can easily display tweets from a Twitter List instead of just our own tweets.

Read More »

Use the Transients API to List the Latest Commenter

51

Transient API

The Transients API is a WordPress feature that I had never heard of until a few weeks ago, when I wrote a post on getting your Twitter follower count in plain text.

On that post, Otto left a comment with a different way of getting the same result, using the Transients API. Instead of using cron, which can be complicated, transients allow you to use just one or two lines.

In this post, I want to show you how to use transients, and to do that, we’re going to build a simple script that will list the latest commenter on your blog, along with their avatar. The end result will look like the image above.

Read More »