【问题标题】:How to start with linkedIn API?如何从linkedIn API开始?
【发布时间】:2015-12-11 23:31:28
【问题描述】:

作为 API 新手,我目前正在尝试将linkedIn 信息用于我的应用程序。为此,我使用python-linkedin 接口来访问linkedIn API。我使用以下命令安装了这个模块:

pip install python-linkedin

我已经编写了一个示例 python 文件来使用这个接口:

from linkedin import linkedin  
API_KEY = "api-key"  
API_SECRET = "api-secret"  
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)

我得到以下输出-

https://www.linkedin.com/uas/oauth2/authorization?scope=r_basicprofile%20rw_nus%20r_network%20r_contactinfo%20w_messages%20rw_groups%20r_emailaddress%20r_fullprofile&state=8a9678902396c6e7f7e0027a486898d2&redirect_uri=http%3A//localhost%3A8000&response_type=code&client_id=api-key

我想将它与我的应用程序集成。我需要从linkedIn 获取数据并将其存储在数据库中。有人知道怎么做吗?

【问题讨论】:

    标签: python


    【解决方案1】:

    您的回调网址应该可以从外部访问。使用 localhost 不是有效的 url。而是尝试使用您的外部 IP 地址。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-05
      • 2019-09-03
      • 1970-01-01
      • 2020-06-08
      • 1970-01-01
      • 2019-06-16
      相关资源
      最近更新 更多