ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

LinkedIN Authentication Error #193

Open mvwijland opened 10 years ago

mvwijland commented 10 years ago

LinkedIn has recently announced that it has changed it's OAuth. It enforces redirect URLs.

When running the first script the result you get is:


LinkedInError Traceback (most recent call last)

in () 25 # Use the app... 26 ---> 27 app.get_profile() /usr/local/lib/python2.7/dist-packages/linkedin/linkedin.pyc in get_profile(self, member_id, member_url, selectors, params, headers) 177 178 response = self.make_request('GET', url, params=params, headers=headers) --> 179 raise_for_error(response) 180 return response.json() 181 /usr/local/lib/python2.7/dist-packages/linkedin/utils.pyc in raise_for_error(response) 61 message = '%s: %s' % (response.get('error', error.message), 62 response.get('error_description', 'Unknown Error')) ---> 63 raise LinkedInError(message) 64 else: 65 raise LinkedInError(error.message) LinkedInError: 401 Client Error: Unauthorized: Unknown Error
ptwobrussell commented 10 years ago

I'll try to take a look at this later today and provide an update. What I hope is that you can just specify any URL as the RETURN_URL variable in the notebook script, and the script still works as expected, but I'll have to test it to be sure. (It may very well be the case, and probably should be the case, that the OAuth app settings needs to match whatever it is as well.)