From version 1.1 ptwix can show results of a twitter search.
Make search is really simple:
Setting the value PtwiX::$SEARCH at the “timeline type” parameter in the constructor.
$PtwiX=new PtwiX('firs','user','pass','http://example.com/ptwix/','/var/www/example/ptwix/cache/',PtwiX::$SEARCH,'silver-red');
Now you can call the setSearchString method and pass it the string that you want to search.
//show 30 tweets that contains the "php" tag
$PtwiX->setSearchString("q=php&rpp=30");
You can setting a title for your search with this code line
$PtwiX->setSearchTitle("All about php");
This is a complete example
<? include "core/PtwiX.php";
$PtwiX=new PtwiX('firs','user','pass','http://example.com/ptwix/', '/var/www/example/ptwix/cache/',PtwiX::$SEARCH,'silver-red');
?>
<html>
<head>
<? $PtwiX->printCssRef(); ?>
</head>
<body>
<?
$PtwiX->setSearchString("q=ptwix");
$PtwiX->setSearchTitle("All about ptwix");
$PtwiX->printBox();
?>
</body>
</html>
For more information on searching queries and operators read this article
Related posts
Tags: 1.1, search, twitter search



Follow PtwiX on twitter












