Next Result fails in python


#1

y is read in from a file and is an an arabic string

get_statuses_mentions_timeline_params[u’language’]=u’ar’
get_statuses_mentions_timeline_params[u’result_type’]=u’recent’

get_statuses_mentions_timeline_params[u’include_entities’]=u’true’
get_statuses_mentions_timeline_params[u’since’]=u’2013-05-28’
get_statuses_mentions_timeline_params[u’until’]=u’2013-05-30’

url = u’https://api.twitter.com/1.1/search/tweets.json?’ + urllib.urlencode(get_statuses_mentions_timeline_params)+ u’&q=’ + y

this returns a propper result set
u’search_metadata’: {
u’count’: 15,
u’completed_in’: 0.031,
u’max_id_str’: u’339893854104850432’,
u’since_id_str’: u’0’,
u’next_results’: u’?max_id=339892941931823103&q=%D8%A7%D9%84%D9%8A%D9%85%D9%86%20since%3A2013-05-28%20until%3A2013-05-30&include_entities=1&result_type=recent’,

When I try to use url = u’https://api.twitter.com/1.1/search/tweets.json?’ + jsonObject[u’search_metadata’][u’next_results’] it fails
{‘status’: ‘401’, ‘content-length’: ‘63’, ‘transfer-encoding’: ‘chunked’, ‘set-cookie’: ‘guest_id=v1%3A137002323232910274; Domain=.twitter.com; Path=/; Expires=Sun, 31-May-2015 18:00:32 UTC’, ‘strict-transport-security’: ‘max-age=631138519’, ‘server’: ‘tfe’, ‘-content-encoding’: ‘gzip’, ‘date’: ‘Fri, 31 May 2013 18:00:32 UTC’, ‘content-type’: ‘application/json; charset=utf-8’}
{u’errors’: [{u’message’: u’Could not authenticate you’, u’code’: 32}]}

This worked fine a couple months ago when I initially wrote it. Did something in the API change?