简体   繁体   中英

How to access linkedin API in python

I am trying to run the linkedin module to request data from linkedin. I used the instructions from the documentation

import linkedin

API_KEY = "123"
API_SECRET = "456"
RETURN_URL = "http://localhost:8000"

authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values())
print (authentication.authorization_url)
application = linkedin.LinkedInApplication(authentication)

authentication.authorization_code = "AQTXrv3Pe1iWS0EQvLg0NJA8ju_XuiadXACqHennhWih7iRyDSzAm5jaf3R7I8"
authentication.get_access_token()

application = linkedin.LinkedInApplication(token='AQTFtPILQkJzXHrHtyQ0rjLe3W0I')

from linkedin import server
application = server.quick_api(

API_KEY, API_SECRET)

However the module has no LInkedInAuthentication object. Any Ideas or other modules to use the linkedin API?

Instead of doing

import linkedin

do

from linkedin import linkedin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM