我正在尝试在https://github.com/ozgur/python-linkedin
中使用python-linkedin库通过脚本向linkedin联系人发送邀请
但是在以下代码上:
from linkedin import linkedin
API_KEY = 'wFNJekVpDCJtRPFX812pQsJee-gt0zO4X5XmG6wcfSOSlLocxodAXNMbl0_hw3Vl'
API_SECRET = 'daJDa6_8UcnGMw1yuq9TsjoO_PMKukXMo8vEMo7Qv5J-G3SPgrAV0FqFCd0TNjQyG'
RETURN_URL = 'https://localhost:8000'
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_url粘贴到浏览器中时,我得到“ redirect_uri与注册值不匹配”
有人可以帮忙吗?随意提出任何其他方法;) 谢谢
答案 0 :(得分:1)
authentication.authorization_code = "the code provided"
之后获取键值authentication.get_access_token()
application = linkedin.LinkedInApplication(token='the token provided')
from linkedin import server
application = server.quick_api(KEY, SECRET)
application.get_profile()
快速用法示例:
static bool
// Deletes the pointer argument if adding fails.
add_vehicle(
src::Vehicle *
),
exists_vehicle(
std::string
),
remove_vehicle(
std::string
);