04.09
For some time now, I’ve had lenflack.com (powered by WordPress) configured with Twitter Tools to automatically update my Twitter account with an announcement of any new blog posts. I’ve also had Facebook configured to pull my tweets as a status update. This essentially keeps all of my major social media outlets linked together, and requires less work on my part to keep others updated.
A month or two back, I changed how Facebook imports my tweets. I tweet quite often, so I didn’t want it to automatically use every tweet as a status update. To solve this, I began using Selective Twitter Status. This allows me to manually choose which tweets are posted to Facebook by appending the hashtag “#fb” to the tweets I’d like posted.
This inadvertently caused the tweets that were automatically generated by my blog posts to cease being sent to Facebook. Doh! I usually generate a fair amount of traffic from my Facebook friends seeing a blog post in my status updates, so this morning I decided I wanted to fix this somehow. Here is the really simple solution I came up with, using Twitter Tools 1.6:
Open the twitter-tools.php file in your favorite text editor (usually located in /wp-content/plugins/twitter-tools/). Find line 127, which reads:
$this->tweet_format = $this->tweet_prefix.’: %s %s’;
Append ” #fb” after the second “%s” so that the line reads:
$this->tweet_format = $this->tweet_prefix.’: %s %s #fb’;
That’s it. It adds the #fb tag to every blog-generated tweet, which are then posted to Facebook by Selective Twitter Status. Not bad, eh? The only downside is that if and when Alex King updates Twitter Tools, you’ll have to re-apply this suffix hack.
As an aside, you might be interested in using http://tr.im to shorten the link URLs Twitter Tools passes. Leo Lincourt has posted an excellent tutorial for this. Check it out!


Are those three logos arranged purposely?
Real cute.
Yeah… I actually spent five minutes finding the logos, resizing them to be the same basic size, and then laying them out in the order of information flow… From this site, to Twitter, and then to Facebook.
And yes, I know I’m a total geek with too much time on my hands.
Len
I have found using a Twitter tool like Tweetdeck or Tweetie (coming MOnday) allows me very good integration between FB and Twitter and I can spend less time on my blog and more access from phone too.
Chris
Hi Chris! I agree, those are good clients for keeping the two services linked together a bit. I’ve used TweetDeck, and downloaded Tweetie today after watching for it’s release with much enthusiasm. I’ve yet to use it, though I’ll likely get to it tonight or tomorrow. I’ve also found that Nambu for both Mac and iPhone/iTouch is a great client, and is currently my software of choice.
I’ve also heard that the Flock web browser has some Twitter and Facebook integration options, but I haven’t tried it yet. Have you?
[...] http://www.lenflack.com/2009/04/09/wordpress-and-selective-twitter-status-for-facebook/ [...]
Not having any luck with this. I changed it, but the twitter it sends isn’t showing the #fb at the end.
$this->tweet_format = $this->tweet_prefix.’: %s %s #fb’;
Hi M@. It’s funny that you mention this… I upgraded WordPress to 2.8.4 yesterday, and it broke everything I had done with TwitterTools (tr.im URL shortening and the #fb hashtag). I realized this right as I was leaving for a party.
When I got back last night, I did a number of things to get the system working. It no longer uses the code I mentioned in this post, and is in fact, a more elegant solution in my mind.
First, I made sure that the WordPress 2.8.4 upgrade worked correctly. Then I upgraded TwitterTools to version 2.0 (which overwrites the changes made in the above blog post). The newest version of TwitterTools has three optional plugins that come with it, one for bit.ly URL shortening, exclude categories, and hashtags. I enabled both bit.ly and hashtags, and configured the hashtag options to add #fb to any tweets.
So far, it has worked flawlessly. Let me know if you hit any brick walls, and I’ll email you.
Len,
Thanks for the tip, for some weird reason I didn’t get the reply, was still looking for a solution. I’ll check it out and let you know if it worked for me too. I would think that the wordpress folx would have caught onto this too.
thanks for the tip.
M@
k, no luck. I put in the #fb tag, but not only did it not update Facebook, the twitter didn’t include the url. Maybe I need to configure things differently.
okay, forget I mentioned the not going to FB, that part’s solved. I also noticed that there is a bit.ly signup. I added the api key and it looks like that part’s working now too.
oo thanks for this tip.
However, im looking for a plugin that allows us to selectively show our twitter in our wordpress blog. I currently use Twitter Tools in my blog but i dont want all of my twitter posts to show.
Any idea how to do that?
M@, Glad that’s working for you!
IcedNyior, I’m not aware of anything that does that, but I’m not terribly familiar with the different packages that are out there. Do you know PHP? I know there are a few scripts out there to get a twitter status (ie: number 5 on http://bit.ly/1ThTqo), and it’s possible they could be hacked to require a #wp hashtag or something.
O.K. I agree with you!THANKS! You guys do a great blog, and have some great contents. Keep up the good work.