/ Published in: PHP
WordPress
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $username = "TwitterUsername"; // Your twitter username. $limit = "5"; // Number of tweets to pull in. /* These prefixes and suffixes will display before and after the entire block of tweets. */ $prefix = ""; // Prefix - some text you want displayed before all your tweets. $suffix = ""; // Suffix - some text you want displayed after all your tweets. $tweetprefix = ""; // Tweet Prefix - some text you want displayed before each tweet. $tweetsuffix = "<br>"; // Tweet Suffix - some text you want displayed after each tweet. $feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=" . $limit; function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) { echo $prefix; for ($i = 1; $i <= $amount; $i++) { echo $tweetprefix; echo $cleaner[0]; echo $tweetsuffix; } echo $suffix; } parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix); ?>