Python rauth connection to linkedin -


i have taken on support app uses rauth connect linkedin. code failing is:

    self.linkedin= oauth1service(                                                              name='linkedin',                                                                   consumer_key=self._consumer_key,                                                       consumer_secret=self._consumer_secret,                                                request_token_url=self.request_token_url,               access_token_url=self.access_token_url,                 authorize_url=self.authorize_url)                self.request_token, self.request_token_secret = \                         self.linkedin.get_request_token(method='get',                         oauth_callback=self.callback_url) 

the owner of app says used work we're getting:

typeerror: request() got unexpected keyword argument 'oauth_callback'

can point me doc/examples me re-architect this?

-jim

it sounds you're using later version of rauth original author was. need amend code conform changes in rauth api. these small, partly necessitated move requests v1.0.0 had many breaking changes in api.

you should read upgrade guide. additionally there's number of working examples.

finally particular error indicating unexpected parameter passed in, namely oauth_callback. because rauth wrapper on requests. requests doesn't know oauth_callback. instead, should use native requests' api , pass in, in case, via params parameter, e.g.:

linkedin = oauth1service(name='linkedin',                                                                                    consumer_key=consumer_key,                                                                        consumer_secret=consumer_secret,                                                                 request_token_url=request_token_url,                                access_token_url=access_token_url,                                  authorize_url=authorize_url)            request_token, request_token_secret = \     linkedin.get_request_token(method='get',                                params={'oauth_callback': callback_url}) 

hope helps!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -