Newstweet hack- advaced search operators (1 post)

  1. buzink
    Posted 7 years ago #

    If you would like to use advanced search operators in newstweet, edit the file newstweet-ajax.php and replace

    $url = 'http://search.twitter.com/search.json?q='.urlencode($_POST['searchterm']).'&rpp=4&lang=en';


    $nt_search = urlencode($_POST['searchterm']);
            $nt_search = str_replace("%3D","=",$nt_search);
            $nt_search = str_replace("%26","&",$nt_search);
            $url = 'http://search.twitter.com/search.json?q='.$nt_search.'&rpp=3';

    In the widget fill in the search word and the advanced search operators in url style. Like this:


    You can find out which operator does what by using the advanced search of twitter.com and taking a look at the resulting url. But beware, never use the 'near', 'within' and 'units' operators, not even empty! They don't work in the twitter-api and will break the request. Use the geocode operator instead

Topic Closed

This topic has been closed to new replies.

About this Topic