【发布时间】:2017-09-01 14:05:56
【问题描述】:
这是一个内部项目。我的最终目标是获取我的连接的详细信息。谁和我在同一个城市。
我是使用 LinkedIn API 的新手。我使用了答案here 中提到的代码来生成访问令牌。现在我正在使用下面的行来获取我的 LinkedIn 个人资料。
application.get_profile(access_token['oauth_token'])
但我遇到了错误。
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
application.get_profile(access_token['oauth_token'])
File "C:\Python34\lib\site-packages\python_linkedin-2.0-py3.4.egg\linkedin\linkedin.py", line 189, in get_profile
response = self.make_request('GET', url, params=params, headers=headers)
File "C:\Python34\lib\site-packages\python_linkedin-2.0-py3.4.egg\linkedin\linkedin.py", line 169, in make_request
params.update({'oauth2_access_token': self.authentication.token.access_token})
AttributeError: 'str' object has no attribute 'token'
有人可以帮帮我吗?
【问题讨论】:
标签: python-3.x rest oauth-2.0 linkedin-api