I want to do an advanced twitter search. Part of the code I’m using is listed below.
$q = "crazy monkeys"; // <This is the query string
$request = "http://search.twitter.com/search.json?q=".urlencode($q);
The problem I have is that I want to search for the exact phrase “crazy monkey”, but it is searching for tweets with crazy AND monkey in any order.
So what I would like to do is include the ” in my string.
I thought I could do it by escaping the quote using $q = "/"crazy monkey/""; but it didn’t work.
If anyone could show me how to include special operators such as ” + or – in my twitter search, I’d greatly appreciate it. Thanks.
The Twitter operators I am trying to use are listed here > https://support.twitter.com/groups/31-twitter-basics/topics/110-search/articles/71577-how-to-use-advanced-twitter-search
The ” and space are also handled well by urlencode
results in: