Display last tweets on your wordpress blog
Category: Wordpress 1It is very useful to show your Twitter account on your wordpress blog by displaying your last tweets. To do this, we need to accomplish 2 steps.
First step
Open in editor function.php file and add at the end the code below:
<?php
function displayLatestTweet($twitterID){
include_once(ABSPATH.WPINC.'/rss.php');
$latest_tweet = fetch_rss("http://search.twitter.com/search.atom?q=from:" . $twitterID . "&rpp=1");
echo $latest_tweet->items[0]['atom_content'];
}
?>
Second step
Open in editor the sidebar.php file and add next code:
<h2>Latest Tweet</h2>
<p><?php displayLatestTweet('twitter_account'); ?></p>
Do not forget to change the twitter_account to your Twitter account name.
Incoming search terms:
- twitter icon
If you liked the article share it by Twitter, Facebook and Google +1.







Ce ai de zis?
rys
you can also refer to this site on how to show the latest tweets in your blog site using tweeter API
. as easy as 1 2 3
http://www.ryscript.co.cc/web/how-to-display-latest-tweets-using-javascript-and-twitter-api/
thanks