Search with multiple terms


#1

I am encountering a problem. I need your help.

I tried to search with multiple terms, for example “happy hour”. I got the unexpected result below.

I made the search URL according to document which is https://dev.twitter.com/docs/api/1.1/get/search/tweets

Unfortunately it doesn’t provide how to make a query string with multiple terms.

If i search only one word like “happy”, it can get the correct result.

Please help me to deal with this problem.

Thanks in advance !!

###################
Using the URL:
###################

http://api.twitter.com/1.1/search/tweets.json?q=happy%20hour&include_entities=true

###################
Unexpected result:
###################

{“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}


#2

Verify that your OAuth code is doing the right thing with the parameter – perhaps it’s over or under encoding it in the signature basestring?

Here are functional examples:

URL:
GET https://api.twitter.com/1.1/search/tweets.json?q=happy%20hour&include_entities=true

Signature base string:

GET&https%3A%2F%2Fapi.twitter.com%2F1.1%2Fsearch%2Ftweets.json&include_entities%3Dtrue%26oauth_consumer_key%3D5aA6oofBOFAwN4tfmEYWjg%26oauth_nonce%3DPSIRQenyEm68WEot3mKsi1luudN56EpBpTrmfJAY%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1369838349%26oauth_token%3D119476949-oYGCs2M5duG5QalbOAK2YUZh8zG3ur7DPYo5qIFN%26oauth_version%3D1.0%26q%3Dhappy%2520hour


#3

Thanks for your reply. So far, if i invoke the api with single word such as “q=happy”, i can get the right result. For example,
https://api.twitter.com/1.1/search/tweets.json?q=happy&include_entities=true

However, if i invoke the api with the many words such as “q=happy hour”, i got the

{“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}

Could you teach me how to solve this problem?

If you need more information to analysis it, please let me know.

Thanks very much !!


#4

Facing the exact same problem. Anyone has any ideas on why it’s happening?