Implement real-time search engine using twitter widget script with PHP for discovering what people are tweeting about on the web right now. I want to explain how you can use twitter widget script to implement search results feature that displays in real time tweets.
Download Script Live Demo
real_search.php
Contains simple PHP and HTML code with Twitter widget script.
<form method="get" action="" name="form">
<input type="text" name="q" />
<input type="submit" value=" Search " />
</form>
<?php
if($_GET['q']){
$search_word=$_GET['q'];
?>
<div>
//twitter widget code
//twitter widget code
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({version: 2,
type: 'search',
search: '<?php echo $search_word; ?>',
interval: 8000,
subject: 'Realtime results for "<?php echo $search_word; ?>" ',
width: 600,
height: 520,
theme: {
shell: {
background: '#ffffff',
color: '#000000'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: false,
loop: false,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'all'
}
}).render().start();
</script>
</div>
<?php
} else
{ ?>
<div> Reat Time Search Results </div><?php } ?>
Related Link
perfect thanx for samples..
ReplyDeletenice but Demo not working
ReplyDeleteaynen demo çalışmadı.. thankss
ReplyDeleteworks fine
ReplyDeleteOf course, what a great site and informative posts with furniture, I will bookmark this site.
ReplyDeleteHii Srinivas Tamada,
ReplyDeletethe demo didnt work anymore, twitter using API 1.1 now..please update.
Very useful. We needed this for our our site.
ReplyDelete