Themergency fooplugins.com
blackbridpieplugin

Twitter Blackbird Pie WordPress Plugin

| 70 Comments

UPDATE : check out the new Blackbird Pie plugin page

UPDATE (15 Nov 2010) : Released version 0.3.4. Plugin added to WordPress.com sites – read blog post.

UPDATE (11 Sep 2010) : Released version 0.3 – “blackbird” button in the visual editor – read blog post.

UPDATE : Updated to version 0.2.5 – non-English tweets now supported – read more here.

You might have heard about a cool new online Twitter tool called Blackbird Pie. If not, then this is the simple explanation :

Twitter Blackbird Pie allows you to generate and embed HTML code that represents a tweet.

Or a graphical explanation might be better :

There already have been a few posts on the subject, and even a Chrome plugin, but here is the first plugin!

Features

  • Exact same look and feel as the respective Twitter profile.
  • Allows for multiple “pies” in a single post (as seen in the examples below).
  • Stores the generated HTML tweet JSON data in a custom field (if possible), so the Twitter API is only called the first time.
  • Slightly better styling than the original Blackbird Pie
    • Better use of the Twitter profile background image and color and tiling.
    • Uses the Twitter profile text color.
    • Uses the Twitter profile link color.
  • Uses the jQuery Time Ago plugin to display a “real time” datetime of when the tweet was tweeted. As of ver 0.2.1 a php function has replaced the need to rely on the Time Ago plugin (so no javascript is added anymore!)
  • Auto-linking of URLs, hashtags, usernames within the tweet text (This script was used)
  • Use either the id or full URL of the tweet.

Examples

[blackbirdpie id="13794126295"]
[blackbirdpie url="http://twitter.com/themergency/status/13968912427"]
new #wordpress theme from @themeforest for #ipad : "Mobility Wordpress Theme for Web and iPad" - http://ow.ly/1L0pN
@themergency
Themergency
[blackbirdpie url="http://twitter.com/MarcForrest/status/14153926000"]

Known Issues

  • The Twitter API seems to intermittently return a bad response. If this occurs, then obviously nothing is stored in a custom field and, instead, a simple message is displayed.
  • There seems to be a property missing from the Twitter API. If you choose to have NO background image, then the API still returns the default image. There is no property to tell you if the image is disabled. More can be read about the issue here (including a simple workaround).

Please Try

Please download the plugin and give it a go and let us know what you think.

41 comments
cloudduster
cloudduster

Is there a way to eradicate the background of the tweet? The background ruins my blog's simplistic design.  I just want it to look natural, like this one >>> http://i.imgur.com/qThf0.jpg

 

I tried this one  >> .bbpBox { background-image:none !important; }

but didn't work out. Please help

 

 

 

keithrozario
keithrozario

This is absolutely one of my favorite wordpress plugins.

Deborah
Deborah

Sounds interesting. I am looking forward to trying this when I get my new wordpress site. Thanks.

MikeTHIS
MikeTHIS

Any way to override the width so it doesn't span my content width?

Say to 400px or so or whatever value?

Thoughtfaucet
Thoughtfaucet

I think it only works with three or less tweets on a post. Any way to get more?

Tom Boot
Tom Boot

Sorry, I cannot get this plugin working...
I keep getting this message:
"There was a problem connecting to Twitter. "

jck
jck

one thing, would be nice if the "blacbirdpie ...] tag didn't show up as a title in the RSS feed, when the post itself has no title. feed exemple ==> http://www.aleablog.com/feed/

Brad
Brad

Was anxious to try this after seeing it on Techcrunch. I get the following error:

Fatal error: Cannot redeclare class Services_JSON in /wp-content/plugins/twitter-blackbird-pie/json.php on line 116

Bummer.

Gerry
Gerry

Brad,
Thanks a lot for helping out. I have resolved to stop strangers in the street to tell them how wonderfully generous you are.
All joking aside, a genuine thank you. Good support is rare enough that it really feels great when you experience it.

Gerry
Gerry

Great plugin - thanks a lot. As you might have guessed though, I'm now going to ask a question...

Does the plugin cache the background image somewhere? I've changed my Twitter background recently and Blackbird Pie seems to still use the old image (even if using a new, previously unused tweet). It's picked up the new profile colours but has stubbornly held on to the old image.

I'd really appreciate it if you could point me in the right direction or give me an idea of where to kick it to get it to wake up to the new image.

Thanks a lot. Genuinely.

Alex (Viper007Bond)
Alex (Viper007Bond)

I didn't want to have to type out the shortcode, so I little bit of code to make use of the built-in embeds API. You can just paste a tweet URL on it's own line now and it'll automatically be converted into an embed. Feel free to use this code. :)

http://viper007bond.pastebin.com/3nVvBDKL

Shinichi NOMURA
Shinichi NOMURA

Thank you for a nice plug-in!

But I have a problem. When I have mutibyte charactors in my real name, they are displayed as something like unicode code points (uXXXXuYYYYuZZZZ).

I think it will be resolved by using "UTF8entities" on $data->contents->user->name the same way as on $data->contents->text.

admin
admin

a nice idea in this post :) I think a new version is in order...

Joel Mackey (@webaddict)
Joel Mackey (@webaddict)

I'm having issues with this plugin on the first included embedded tweet. It makes the first one REALLY long with white space inside the included tweet but all following embedded tweets look perfect. Any ideas?

Here's

Simon T Small
Simon T Small

I'm also having issues with the plugin, it installs but when I load the page with the embedded tweet the page half loads.

Biosfera Ms
Biosfera Ms

eu instalei o plugin mas não consigo usar

tamara
tamara

I don't know what to tell you. I just downloaded the latest.tar.gz from wordpress.org, unpacked it, and there is *no* class-http.php file in the includes directory!

tamara
tamara

I can't get this to work on my site. When it hits the call out for the tweet, it just stops. I looked at the code and it is including a file WPINC/class-http.php which I don't have in my installation (WP 2.9.2). Any clues as to why this is so?

themergency
themergency moderator

 @cloudduster a background colour is also set, so try :

 

.bbpBox { background:none !important; }

 

If you still don't have any luck then you will have to edit the plugin php file. Line 313 of blackbird-pie.php has the code for the background

Brad
Brad

I had a look at yr site and the tweet is weird - it seems your site's reset.css or theme is interfering with the tweet CSS

admin
admin

Hello Thoughtfaucet
You can have as many tweets as you like in a post. Check out the demo page where there are 9 embedded tweets

cheers
Brad

admin
admin

Hi Brenda,

As posted on your blog:

WRT the embedded tweet - It seems your theme's CSS is interfering with the tweet styling. There is a .author style that sets a width to 520px and the tweet contains a span tag with class "author". If you can edit your theme's CSS add this line to fix the problem:

p.bbpTweet span.metadata span.author{width:100% !important;}

pls let me know if it solved your issue

admin
admin

That error occurs when the call to Twitter fails. Sometimes Twitter gets really busy and cannot handle all the requests to it. Just refresh your page until it goes through. The nice thing about the blackbird plugin is that it caches and stores the response it gets from Twitter in custom fields, so it only needs to connect the first time.

admin
admin

awesome! thanks for letting us know. And thanks for using it :D

admin
admin

Hi Brad - this is caused by a conflict with another plugin that uses the same JSON library. I have sorted it out and uploaded a new version (0.3.3)
It should be available shortly.

admin
admin

Hi Gerry - the plugin uses hidden custom post fields to "cache" the twitter info in WordPress. So you first need to delete the custom field for the post. Now to be able to see the custom field and delete it you need to do the following:
Copy the following code into a file named "show-hidden-custom-fields.php" in your "/wp-admin/plugins" folder

<?php
/*
Plugin Name: Show Hidden Custom Fields
*/

add_action( 'admin_head', 'showhiddencustomfields' );

function showhiddencustomfields() {
echo "<style type='text/css'>#postcustom .hidden { display: table-row; }</style>\n";
}

?>

And activate the new plugin. Then when you edit the post that has the tweet embedded, you will now see custom fields named similar to "_blackbird_12345". Just delete that custom field and you are all done. The next time your page is viewed, it will query twitter and get the new URL to your background.

In a future version I want to build a page where you can view all embedded tweets with the option to update/delete the cache.

cheers and I'm glad you like the plugin :D

Alex (Viper007Bond)
Alex (Viper007Bond)

Excellent!

Oh, and incase it wasn't clear, you can do that from within the class if you want (it doesn't have to be a stand alone function line that with a global var). Same way you'd do a shortcode.

admin
admin

thanks for the tip (and code) Alex - i will add this into the next release :)

admin
admin

Hi Shinichi
Yes you are 100% correct! Thanks for the heads up - i will make the change ASAP :)

Joel Mackey (@webaddict)
Joel Mackey (@webaddict)

Sorry was going to include a link to reference my problem but I don't want to publish it with it looking so silly! :)

admin
admin

what version of WP are you running? also check that the ZLIB module of PHP is enabled on your server

admin
admin

"I installed the plugin but I can not use"

Did you get any errors? What version of WP are you running?

admin
admin

You are right! The file has been renamed to http.php
I will update the plugin to reflect this. Thanks Tamara :)

admin
admin

@tamara - the file /wp-includes/class-http.php is included in wordpress since version 2.7, so I am not sure why the plugin is not working. There could have been an issue with connecting to the Twitter API (there are sometimes delays if the service is too busy)

cloudduster
cloudduster

 @themergency Thanks. I ended up removing lines 313 and 341 and it worked! Many thanks. Hopefully, the next version will have this option :)

admin
admin

what is the twitter URL so i can test it my side to see why it is being elongated?

Trackbacks

  1. [...] This post was mentioned on Twitter by bradvin and Themergency, Themergency. Themergency said: we just released out latest #wordpress #plugin "Twitter Blackbird Pie" – http://themergency.com/twitter-blackbird-pie-wordpress-plugin/ [...]

  2. [...] more here: Twitter Blackbird Pie WordPress Plugin | Themergency Tags: blackbird, plugin, [...]

  3. [...] you’re using WordPress and would like to use the embeddable tweet feature, Themergency has a Twitter Blackbird Pie WordPress plugin just for you. Just download the plugin and install it [...]

  4. [...] You can find the plugin here, and if you want to read more about it, visit the developer’s site. [...]

  5. [...] you’re using WordPress and would like to use the embeddable tweet feature, Themergency has a Twitter Blackbird Pie WordPress plugin just for you. Just download the plugin and install it [...]

  6. [...] thought that was pretty easy, but things just got even easier. There’s now a Blackbird Pie WordPress plugin that allows you to embed them using WP [...]

  7. [...] Twitter Blackbird Pie WordPress Plugin | Themergency For my Twitter friends who use WordPress and like Twitter's alpha "Blackbird Pie" service. (tags: twitter blackbirdpie wordpress_plugin) [...]

  8. [...] is also a WordPress plugin for inserting Blackbird Pie code, but I found it to be overly tedious. Rather than giving us a [...]

  9. [...] ou CMS, talvez necessite de um plugin para exibir corretamente os tweets incorporados.  Baixe o Twitter Blackbird Pie WordPress Plugin e, na sequência, instale. Aí basta colar um pequeno código em seu post com a URL do seu tweet e [...]

  10. [...] Blackbird Pie WordPress Plugin Einzelne Tweets ganz einfach in den Blog einbauen. [...]

  11. [...] WordPress プラグインで、名前に日本語が入っていると、文字化け、というか unicode [...]

  12. [...] voy a referir tuiteos de las ultimas 3 semanas pero no voy a añadir avatares hasta que instale un plugin que permite insertar (embeder) los tweets y que localicé gracias a @tintaalsol. Tanto código enlentecía mucho la publicación. Demasidos [...]

  13. [...] Chris Pearson vs Matt Mullenweg (big thanks for the amazing Twitter Blackbird Pie WordPress plugin) [...]

  14. [...] donc le plugin « Twitter Blackbird Pie » qui moyennant l’usage d’un shortcode vous permet d’insérer [...]

  15. 情報操作 says:

    [...] Twitter Blackbird Pie WordPress Pluginがアップデートされたので、テストの意味もかねてポストしました。 [...]

  16. [...] sometimes you want this “cache” to expire. Recently Gerry had a similar problem and commented about it. I replied with a solution, but I thought that more people might have a need for this plugin so I [...]

  17. [...] of posts that you update on a regular basis. In my case, every time I release a new version of the Twitter Blackbird Pie plugin, I update the original post with a link at the top to the new post. Here is the walk through of the [...]

  18. [...] Twitter Blackbird Pie WordPress Plugin [...]

  19. [...] was also a chance to try out this Blackbird Pie plugin (it turns the url of a tweeted message into an image of your [...]

  20. [...] is additionally a WordPress specific plugin as well as a Google Chrome extension for using Blackbird Pie. June 30, 2010 11:06 am Jeff [...]