我想從公共個人資料中獲取所有信息。 LinkedIn說我應該能夠得到:沒有得到從linkedin的完整個人資料信息python
<id>
<first-name>
<last-name>
<headline>
<location>
<name>
<country>
<code>
</country>
</location>
<industry>
<current-status>
<current-status-timestamp>
<connections total="" >
<summary/>
<positions total="">
<position>
<id>
<title>
<summary>
<start-date>
<year>
<month>
</start-date>
<is-current>
<company>
<name>
</company>
</position>
</positions>
我只能夠得到
<headline>
<first-name>
<last-name>
請讓我知道如何更改我的代碼:
CONSUMER_KEY = '9pux1XXXXXX' # This is api_key
CONSUMER_SECRET = 'brtXoXXXXXXX' # This is secret_key
USER_TOKEN = '27138ae8-5XXXXXXXXXXXXXXXXXXXXXXXXXXX' # This is oauth_token
USER_SECRET = 'ca103e23-4XXXXXXXXXXXXXXXXXXXXXXXXXX' # This is oauth_secret
RETURN_URL = 'http://localhost:8000'
from linkedin import linkedin
from oauthlib import *
# Define CONSUMER_KEY, CONSUMER_SECRET,
# USER_TOKEN, and USER_SECRET from the credentials
# provided in your LinkedIn application
# Instantiate the developer authentication class
authentication = linkedin.LinkedInDeveloperAuthentication(CONSUMER_KEY, CONSUMER_SECRET,
USER_TOKEN, USER_SECRET,
RETURN_URL, linkedin.PERMISSIONS.enums.values())
# Pass it in to the app...
application = linkedin.LinkedInApplication(authentication)
# Use the app....
a = application.get_profile(member_url='http://www.linkedin.com/pub/louis-litt/56/464/816')
當我運行該程序,我得到的全部是:
{u'headline': u'Senior Associate at Pearson Hardman', u'lastName': u'Litt', u'siteStandardProfileRequest': {u'url': u'http://www.linkedin.com/profile/view?id=198202770&authType=name&authToken=yIgW&trk=api*a295771*s303335*'}, u'firstName': u'Louis'}
如果LinkedInApplication.get_profile文檔不指定任何其他調用參數,然後從linkedin獲得支持(假設他們寫了該庫)。 – dilbert
@dilbert我試圖得到他們的支持。在他們的網站上發佈一個問題....沒有迴應,但它只是一天 – user1681664