18JunWordpress plugin : WP Quote Tweets

WP-Quote-Tweets allows authors to quote Twitter updates in posts or pages using a simple shortcode.

[quotetweet tweetid=123456789].

The tweetid can be found in the URL of the tweet that you want to quote.

For example. the following tweet has this URL: http://twitter.com/TCorp/status/2220563803

Its tweetid is 2220563803, making the shortcode look like this:
[quotetweet tweetid=2220563803]

Resulting in….

WP Quote Tweets is available for download NOW! (Allows you to quote tweets using a shortcode) http://tanin.nl/CfZP #wordpress #wp

if the icon doesn’t work, it most likely due to twitter.com cluster cache and not this plugin. :-p

The WP Quote Tweets plugin is available for download on wordpress.org

Author: Tanin

Tanin in an information technology consultant specializing in complex heterogeneous environments. He can be reached through multiple social networking sites including Twitter.

Related Posts

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.


  1. 1 baron18 Jun 2009

    Works great, thank you

  2. 2 J C18 Jul 2009

    Is it possible to use this plugin in the theme files using a php function?

    Lovely stuff. Thanks.

  3. 3 Tanin19 Jul 2009

    I’ve never done that, but in theory, you could try to call the ‘wp_quote_tweet_exec’ function in the class manually. Note that you’ll have to pass on an array as parameter (Something like array(‘tweetid’=>’12345678′))

  4. 4 J C19 Jul 2009

    Thanks – so for example would it look something like this?:

    wp_quote_tweet_exec(array(‘tweetid’=>’2622665396′));

    or

    wp_quote_tweet_exec(array(‘tweetid’=>$tweetID));

    I tried this and had no luck – is anything wrong with that code?

    Essentially for each post I make about a certain person, I want to include in the template a featured tweet, which a function fetches using the $tweetID from a post Custom Field.

    I tried do_shortcode() but couldn’t work out how to pass the $tweetID to it!

  5. 5 Tanin19 Jul 2009

    Again, I haven’t tested this, but try the following:

    // manually create an instance of the class:
    $quotedTweet = new wpQuoteTweet();

    // manually execute the function and echo out its contents
    echo $quotedTweet->wp_quote_tweet_exec(array(‘tweetid’=>$tweetID));

  6. 6 J C19 Jul 2009

    It worked! Legend.

    Thanks so much for your help :o )

    I will post here when the site is done so you can see it in action.

    J

  7. 7 J C19 Jul 2009

    Just one more question to bug you with:

    If I’m using this plugin to show two or three featured tweets from various users on my site, and I get thousands of visitors every day, is that going to cause problems with Twitter?

    I’ve heard stories about there being issues with making a large number of requests. Any advice?

    Thanks :o )

  8. 8 Tanin19 Jul 2009

    If your /cache/ subdirectory is writable, each generated tweet will be cached in there for 24 hours.

  9. 9 J C19 Jul 2009

    Thanks :)

    fyi. the above smileys were intended to be : ) not :O

  10. 10 J C19 Jul 2009

    Last question I promise :)

    Is it possible to edit the plugin so that it returns hyperlinks that open in a new window?

    I don’t really understand the plugin code well enough to edit it myself.

    Thanks again.

  11. 11 Tanin19 Jul 2009

    All links that are automatically generated already have the rel=”external” attribute. You can use javascript to make those open in a new window (the XHTML compliant way)

    Something like this:

    function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i=0; i var anchor = anchors[i];
    if (
    anchor.getAttribute("href") && (
    anchor.getAttribute("rel") == "external" ||
    anchor.getAttribute("rel") == "external nofollow" ||
    anchor.getAttribute("rel") == "nofollow external" )
    )
    anchor.target = "_blank";
    }
    }
    window.onload = function() {
    externalLinks();
    }

  12. 12 J C19 Jul 2009

    Thanks!

    Perfect.

  13. 13 Terence Eden15 Aug 2009

    Quick bug report.

    When I tried to use this I got the error “URL file-access is disabled in the server configuration”. Most hosting providers restrict the use of file_get_contents for security reasons. I was able to get it working by changing the two file_get_contents($url) into cURL – like so…

    $curl_handle=curl_init();
    curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($curl_handle,CURLOPT_URL,$url);
    $content = curl_exec($curl_handle);
    curl_close($curl_handle);
    $status = new SimpleXMLElement($content);

    For security and interoperability, you may want to make those changes in the next release of the plugin.

    HTH

    T

  14. 14 Tanin15 Aug 2009

    Issue has been addressed and solution implemented in version 2.2.3.

    Thanks for the report.

    - Tanin

  15. 15 Markus25 Aug 2009

    Hi there! Thanks for that great plugin! Very nice idea. Unfortunately it doesn’t work here. I always get

    Fatal error: Cannot instantiate non-existent class: simplexmlelement in /***/wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 257

    Do you know what’s causing this problem? I tried it on a brand new WP installation and it didn’t work :(

  16. 16 Markus25 Aug 2009

    Hi! This is Markus again. Finally the WP Quote Plugin works. But it was neccessary to upgrade to PHP 5. The standard PHP version is 4.4.9 at my webhost all-inkl.com. Just in case another plugin user has the same experience.

    Again, thanks for the really nice plugin.

    Best,

    Markus

  17. 17 Markus31 Aug 2009

    And for the third time :) I hope I’m not buggin you. I just wrote an article about WP Quote Tweets on my other blog http://www.bloggezwitscher.de/tweets-im-blog-einbinden-die-zweite-wp-quote-tweets/ .

    Besides the really cool features you provide with your plugin there are some drawbacks:

    Tweets look really ugly in feedreaders
    error messages in case your server IP uses too many API pulls
    There should be the option to disable “recaching” of tweets after 24 hours

    If you’re still working on the plugin it would be cool to implement some of those ideas :)

    Have a nice week. Best regards

    Markus

  18. 18 Tanin31 Aug 2009

    Thanks for the feedback, Markus. This plugin definitely needs to be refined further and it can only be done with helpful feedback like yours.

    All of the above comments have been addressed in 3.0.0. If you see anything else, let me know.

    - Tanin

  19. 19 Tanin01 Sep 2009

    OK, fine…version 3.1.0 will cache the entire xml files as it reads from the twitter. Will be released once I can give it a good run through testing.

  20. 20 Markus02 Sep 2009

    Hey Tanin! This is so cool! Thanks for 3.0.0!

  21. 21 Scott22 Sep 2009

    Hey Tanin -

    Thanks for the plugin!

    I am having an issue after I updated today.

    When a new post comes onto the blog it throws an error on the first load only.

    “Warning: file_put_contents() [function.file-put-contents]: Filename cannot be empty in /home/thefinge/public_html/wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 374″

    Would you be able to help? Is there just some warning option I need to suppress?

  22. 22 Tanin22 Sep 2009

    D’oh!

    That should not have been left there. I just released 4.0.2. A fixed has been applied in this release.

    - Tanin

  23. 23 Jobless Lawyer26 Sep 2009

    how do I reduce the size of the tweet quotes on my site?

  24. 24 Tanin27 Sep 2009

    Try selecting a different template in the settings page.

  25. 25 horst11 Oct 2009

    I tried to install your plugin, but it failed

    “Parse error: syntax error, unexpected ‘{‘ in /wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 412″

    I used your latest version, can you help me?

    thank you!

  26. 26 Tanin11 Oct 2009

    horst, you need php5 for this plugin. What version are you running?

  27. 27 horst11 Oct 2009

    Oh, I’ve got just php4. :-(

    Thank you for your fast answer!

  28. 28 Tanin12 Oct 2009

    PHP 5 was released 5 years ago. You may want to inform your provider and have them upgrade php.

  29. 29 Patrick16 Dec 2009

    Hi Tanin:

    In theory, I love this plugin. Unfortunately, I can't get it to activate on my blog. I've made the subfolder writable and have tried it as 766 and 777. Both times, when I try to activate the plugin, I get this fatal error:

    Parse error: syntax error, unexpected '{' in /home/.tatoo/adminpatrick/patrickkphillips.com/wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 422

    I suppose it's entirely possible that I'm not running php5. But I have absolutely no idea how to determine this. Could this be the problem, or would you have any other suggestions?

  30. 30 Tanin16 Dec 2009

    @Patrick, you’re correct. The line you’re referring to uses a PHP5 error handling routine (ironic, i know). Your current PHP version is 4.4.9. I would highly recommend upgrading to PHP 5.x.x.

  31. 31 Patrick17 Dec 2009

    That was exactly the problem. It's now working well! Thanks so much!

  32. 32 @RobertAndrews22 Dec 2009

    I'm only seeing “Warning: file_put_contents(/home/randrews/public_html/wp-content/plugins/wp-quote-tweets/xmlcache/twitterTweet.6907314312.xml) [function.file-put-contents]: failed to open stream: Permission denied in /home/randrews/public_html/wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 418″

    … and the style isn't being applied to the tweet correctly either.

  33. 33 Tanin23 Dec 2009

    @Robert, check the rights on the xmlcache directory. It’s not writable, so the script can’t…write.

  34. 34 Juan Lapeyre14 Jan 2010

    When I try to activate the plugin, I get this fatal error:

    Parse error: syntax error, unexpected '{' in /home/.tatoo/adminpatrick/patrickkphillips.com/wp-content/plugins/wp-quote-tweets/wp_quotetweets.php on line 422

    my current PHP version is 5.2.9

    I used your latest version, can you help me?
    Thanks so much!

  35. 35 Tanin14 Jan 2010

    According to the info I found, you’re running PHP/4.4.9 and not 5.2.9.

    http://uptime.netcraft.com/up/graph/?host=edutec-peru.org&Examine=Find

  1. 1 WordPress WP Quote Tweets Plugin - Bronson Harrington
  2. 2 Tweets im Blog einbinden, die zweite | WP Quote Tweets : BlogGezwitscher

Leave a Reply