Commit 76b15eae by Chris Rossi Committed by Diana Huang

Get json data.

parent 46657b8f
......@@ -104,8 +104,9 @@ class LinkedinAPI(object):
hashes = ','.join(("email-hash=" + md5(email) for email in emails))
url = "https://api.linkedin.com/v1/people::(%s):(id)" % hashes
url += "?oauth2_access_token=%s" % self.tokens.access_token
request = urllib2.Request(url, headers={'x-li-format': 'json'})
try:
response = urllib2.urlopen(url).read()
response = urllib2.urlopen(request).read()
print "GOT IT!", response
except urllib2.HTTPError, error:
self.http_error(error, "Unable to access People API")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment