Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将LinkedIn API与Python结合使用_Python_Google App Engine_Oauth 2.0_Linkedin Api - Fatal编程技术网

将LinkedIn API与Python结合使用

将LinkedIn API与Python结合使用,python,google-app-engine,oauth-2.0,linkedin-api,Python,Google App Engine,Oauth 2.0,Linkedin Api,我正在尝试使用LinkedIn API让用户登录到我们基于google app engine的系统。我正在使用ozgur/PythonLinkedIn库来实现它 现在到目前为止,我已经能够打印authentication.authorization\u url,并获得authentication.authorization\u code authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_UR

我正在尝试使用LinkedIn API让用户登录到我们基于google app engine的系统。我正在使用ozgur/PythonLinkedIn库来实现它

现在到目前为止,我已经能够
打印authentication.authorization\u url
,并获得
authentication.authorization\u code

 authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values())
 print authentication.authorization_url  # open this url on your browser
 application = linkedin.LinkedInApplication(authentication)
 authentication.authorization_code = 'xxxxxxxxxxxxxxxxxxx'
 authentication.get_access_token()
现在,一旦我调用
get\u access\u token
方法,我就会得到以下错误:

ConnectionError:HTTPSConnectionPool(host='www.linkedin.com',port=443):url:/uas/oauth2/accessToken超过了最大重试次数(原因是:[Errno 13]权限被拒绝)


我也使用linkedin登录gae,但我使用simpleauth。simpleauth非常好用,如果你在ozgur/python linkedin上仍然有问题,那么你可能想尝试simpleauth进行gae登录。我正在寻找simpleauth,你能不能快速告诉我如何在_on_signin方法中获取参数(数据、身份验证信息、提供者)?是的,您可以将其映射到webapp2,如
/auth/
,然后可以向您的应用程序发出请求,如
/auth/linkedin
。如果是这样的话,您可能需要进行更多的调整,请在authhandler中查找simpleauth。它还可以通过Facebook和Foursquare进行身份验证,所以我认为它相当不错。如果您对simpleauth有问题,请发布一个新问题,我们可以为您提供更多帮助。我是否需要LinkedIn的任何许可才能获取登录到我的系统的用户的电子邮件id?请尽快回复:)