问题
I'm trying to get information from the Gimmebar API (redirects to the access token step) and having problems with the last step exchanging the access token for the data.
#getting access token successfully before this
post_url = '/tags'
headers = {'Authorization': 'Bearer %s' % access_token}
query = '/collections'
full_url = '%s%s%s' % (base_url, post_url, query)
req = urllib2.Request(full_url, headers=headers)
response = urllib2.urlopen(req)
the_page = response.read()
It breaks at the urllib2.Request and I'm getting an error that I'm not sure what to do with:
No exception supplied
Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py in http_error_default, line 510
Here is the view so you can see how I got to step5...
来源:https://stackoverflow.com/questions/8458011/problems-passing-access-token-to-authenticate-with-api