Bullman Design

Blog

Making WordPress, Twitter and Facebook Fall in Love

February 1st, 2011 No Comments
wp-twit-fb-heart

As another Valentine’s Day draws near, I feel compelled to write about love. Not just any kind of love though. I’m talking about that special kind of love that happens when WordPress, Twitter and Facebook come together and create some serious magic (cue the Barry White soundtrack).

I’m talking about being able to post an update to WordPress and have it automatically tell your Twitter and Facebook accounts “Hey, I just posted something new! You should come check it out”. This technique will save you all kinds of time to get into trouble or do whatever it is your heart desires.

While developing one of my recent sites, I learned all too quickly that getting these three platforms to play nicely isn’t the hardest thing you’ll ever do, but it is by no means an intuitive, simple setup. I’ll spare you the boring back story and get right to it.

Setting The Mood

While I’m sure there are other ways of doing link WP, Twitter & Facebook, the method I’m using goes like this:

  1. You publish a new post on WordPress
  2. WordPress sends the post title and link to Twitter
  3. Twitter then sends the post to Facebook

So here’s how it’s done.

Get the WP to Twitter Plugin

  • The first thing you need to do is get the WP to Twitter plugin. There are several plugins that accomplish that same task but I found this one to be the simplest and most intuitive to set up.
  • Download, install & activate the plugin in the usual way. (For more on installing plugins, check out the official WordPress documentation.)
  • And that’s it (just kidding). Twitter makes you jump through some hoops before you can use the plugin. I wish it were as easy as putting in your Twitter username & password, but it isn’t. Twitter now uses Oauth for authentication. It isn’t simple or easy, but it is more secure and ultimately a better solution. Click here to read more about Oauth.
  • Navigate to the WP -> Twitter settings page. The link will be in your Settings tab in the WordPress Admin.
  • In order for the plugin to work you have to create a new Twitter application. The “Connect to Twitter” section has a load of helpful information regarding the settings you will need to make the application work.

Registering a New Twitter Application

  • Head over to the Twitter Developer site.
  • Click the “Register an app” link.
  • Sign in using your Twitter username and password.
  • Fill out the application info using the recommended settings in the WP to Twitter settings page.
  • In the following page copy your Consumer key and Consumer secret and paste them into the WP to Twitter settings page.
  • To get your Access Token head back to the Twitter application settings page. In the upper right corner of the page, click on the “My Access Token” button.

  • Copy the Access Token and Access Token Secret and enter them into the WP to Twitter settings page.
  • Click “Connect To Twitter”.
  • Your Twitter account is now connected. Make sure you configure the other WP to Twitter settings. The plugin allows you to do some pretty cool things like deciding what to post (posts, pages, edits), customizing how the post will look, selectively posting from certain categories, adding post tags as hashtags and several other bits of Twittery goodness.

Linking Twitter & Facebook

Now that WordPress and Twitter are playing nicely together, it’s time to bring Facebook into play.

  • Login to your Facebook account.
    This method links your Twitter account and main Facebook profile. If you would rather post only to a Facebook page, use the Smart Tweets for Pages app.
  • Head to the Twitter app page.
  • Enter your Twitter username & password
    If you get a “Twitter is over capacity” message, just keep trying. I had to do it three times.
  • In the Request for Permission page, grant the Twitter app access to your Facebook account.
  • Your Twitter & Facebook accounts are now linked.

Try creating a new post in WordPress. After you publish, you should see a new Tweet and Facebook update with the post title and permalink. Much quicker, isn’t it? Use your new found free time wisely and try not to get into too much trouble.

~ Cheers

Top