Search Tweets, "This method requires a GET or HEAD."

  api, error-handling, python, twitter

I am trying to get tweets posted with some specific Twitter hashtags. I used searchtweets library to use Twitter Api.

tweets = collect_results(rule,
                         max_results=10,
                         result_stream_args=enterprise_search_args) 

When I called Api with collect_results, it gives an error:
HTTP Error code: 400: {"errors":[{"code":86,"message":"This method requires a GET or HEAD."}]}
Request payload: {‘query’: ‘bitcoin’, ‘maxResults’: 100}.
I could not found any solution for this for Python, where and how should I add GET method to the code? Thank you.

Source: Python Questions

One Reply to “Search Tweets, "This method requires a GET or HEAD."”

LEAVE A COMMENT