Home › Forums › Advanced usage › Authentication error with Boolean searches w parentheses
Tagged: authentication, Boolean searching, errors
This topic contains 1 reply, has 2 voices, and was last updated by mhawksey 4 years, 7 months ago.
-
AuthorPosts
-
July 14, 2016 at 12:54 am #768
I am trying to run TAGS with a Boolean search with parentheses, e.g. (foo AND #winning) OR (bar AND from:eegering)
Specifically the search in my use case is (addiction AND from:GrantDevJW OR from:NIHFunding) OR (substance abuse AND #funding OR from:NIHFunding -writer)
When I run the script, I get the following error: Request failed for https://api.twitter.com/1.1/search/tweets.json?q=%28addiction%20AND%20from%3AGrantDevJW%20OR%20from%3ANIHFunding%29%20OR%20%28substance%20abuse%20AND%20%23funding%20OR%20from%3ANIHFunding%20-writer%29&count=100&result_type=recent&include_entities=1 returned code 401. Truncated server response: {“errors”:[{“code”:32,”message”:”Could not authenticate you.”}]} (use muteHttpExceptions option to examine full response)
Not sure what is happening here…I can run the searches separately and combine the results easy enough, but my inquiring mind wants to know what it is about parentheses that throws off the authentication. Took a look at the source and I think the “magic” must be in the TAGS and/or TwtrService libraries, because I didn’t see anything that leaped out at me as being a possible cause.
July 15, 2016 at 12:24 pm #769Hi – Unfortunately this is a known issue with how Google make the request to Twitter and one Google say they won’t fix https://code.google.com/p/google-apps-script-issues/issues/detail?id=3046 (TAGS uses the suggested fix but it still doesn’t work)
In your example you could run two separate TAGS sheets one collecting
addiction AND from:GrantDevJW OR from:NIHFunding
the othersubstance abuse AND #funding OR from:NIHFunding -writer
-
AuthorPosts
You must be logged in to reply to this topic.