Currently the method being adopted by many web masters to display tweets on their web sites does not support retweets (RT).
Recently there was an upda
Author: | MarabouStork (profile at wordpress.org) |
WordPress version required: | 2.0.2 |
WordPress version tested: | 3.0.5 |
Plugin version: | 1.0.1 |
Added to WordPress repository: | 09-10-2010 |
Last updated: | 11-10-2010
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | http://maraboustork.co.uk/index.php/2010/10/a... |
Total downloads: | 893 |
Click to start download |
Allows you to add twitter feeds to your site including all retweets (which are not returned by twitters .json feed). Also enables you to add tweets to your blogs and word press pages.
Credits
- Some js used from http://twitter.com/javascripts/blogger.js
- Google API's http://ajax.googleapis.com/ajax/services/feed
- Anyone who has blogged about the problems with displaying RT's
If you have followed the advice in one of the many blogs on the internet that instruct you how to add twitter feeds to your
site then you have probably already added an <ul id="twitter_update_list"></ul>
element to your pages, along with two
javascript includes:
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/[yourUsername].json?callback=twitterCallback2&count=10"></script>
This approach retrieves your tweets using the twitter .json feed which calls a method called twitterCallback2 in
blogger.js that then inserts your tweets into the <UL>
element with the id "twitter_update_list".
The problem here is that the .json feed does not currently return retweets. When you start looking around for a solution
to this you will notice that twitter responded to this problem by introducing an include_rts=true
parameter which is supposed
to add retweets to their feed.
Unfortunatly, after some research it seems that the include_rts
parameter is only supported by the .rss and .atom feeds
(http://twitter.com/statuses/user_timeline/yourUsername.atom/.rss) and to make matters worse you cannot simply replace
the url used in the second of the script includes above to use the .atom or .rss urls because the output from these urls
is not recognised by the code in blogger.js.
This solution uses a service provided by google to convert the .atom feed into a JSON object which is then used with code
borrowed from blogger.js to insert the tweets, including the retweets to your <ul id="twitter_feed_list"/></ul>
element.
In fact, we have also given you the ability to put multiple feeds on a single page by allowing you to provide the name the element that
will recieve them when calling our code (see FAQ's). Also, by implementing the code in the footer.php file as instructed
anywhere you add the <ul>
tag your feed will appear. This means that if you have your feeds being inserted into a
element on your home page and you then create a blog that also contains this same <ul>
element then
the feed will also appear in your blog page.