Tweet Search Not Working properly with multiple keywords

php
search

#1

I am trying to search user tweets with query string “developer"OR"designer"OR"social media”, but I am getting only those tweets which contain social media phrase, when I remove that space contain keyword(“social media”) then all results retrieve means all tweet which contain developer, designer. Or if i remove space between social media, then result comes out. Can anyone please help me to solve this problem.

My code
$html_str = “developer”+OR+“designer”+OR+“social media”.
$twitteroauth = new TwitterOAuth(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET, $user_oauth_token, $user_oauth_token_secret);
$twitter_search_details=$twitteroauth->get(‘search/tweets’, array(“count” => “100”,“q”=>urlencode($html_str),“result_type”=>‘mixed’));


#2

I think the way you want to format the search is like this:

$q = '"developer" OR "designer" OR "social media"';
$twitter_search_details = $twitteroauth->get('search/tweets', array("count" => "100", "q" => $q, "result_type" => 'mixed'));

#3

Thanks for Your Suggestion but this one is not working.


#4

What isn’t working about it? What are you getting and what do you think is wrong about it?

My test resulted in this which contains some tweets with each keyword.

Good bye social media hello notebooks and homework 😭😭
http://t.co/qAhWA8nV7S :Super Cool HELPER  for demanding kids in social media. http://t.co/OgqgNqxJyH
From #backpacker to Eco Fashion Designer listen to our podcast http://t.co/2W1CaFrOy5 http://t.co/qCBQOq4e0z
@asap_falcon getcho over emotional ass TF off social media. Hate seeing this shit
RT @NeuvooIntVan: SAP is hiring a #Intern, #Application Developer Job, apply now! #Vancouver #jobs http://t.co/nUMasJo8cm
Make Social Media Messages Beautiful And Noticeable With Notegraphy http://t.co/7sxJ7vSueR via @valmg
Yes! Meet @minervatweet, CTO of NYC, Patent Holder, Developer, Mother and Filipina American http://t.co/gf2BbG6pde http://t.co/HF2og6LVOg
Check out what I found. Indian Ethic Beatiful Traditional Bollywood Designer replica long dres lehengha  http://t.co/dhRq5wjN7E via @eBay_UK
11 Impressive Developing World Social Media Stats http://t.co/UC1dOal98L
Want to work at Havertys Furniture? We're #hiring in #Rockville, MD! Click for details: http://t.co/vmW3EYtEyh #Art #Job #Jobs #CareerArc
We're excited to have @andrewwatson, Lead Developer for @IonicSecurity, presenting at #ATO2015! http://t.co/P3KAMNyedM
Our company is looking for a Web Designer. If you are interested, contact me and I can provide a referral. https://t.co/8SjkEjg5sD
RT @blackenterprise: Self-Taught Swimwear Designer Launches Swimsuit Line for all Sizes http://t.co/JAdKNtct22
Yes! Meet @minervatweet, CTO of NYC, Patent Holder, Developer, Mother and Filipina American http://t.co/HxPuzr1oq4 http://t.co/K15MYshQzc
RT @ElizabethMaidst: the ways in which some people use social media is such a joke