我正在使用带有oauth库的linkedin api。我的授权网址是 https://www.linkedin.com/uas/oauth2/authorization/?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44
但它给了我错误的页面未找到它显示我无效的客户端id.please让我知道我在哪里出错。我正在localhost。
答案 0 :(得分:3)
要删除未找到的网页,请删除' /'之前'?'
https://www.linkedin.com/uas/oauth2/authorization?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44
答案 1 :(得分:1)
LinkedIn的OAuth 2.0授权终端是:
https://www.linkedin.com/uas/oauth2/authorization # <-- no '/' at the end
其中没有斜线。您应该从请求网址中删除尾部斜杠,它应该可以正常工作。
最终请求网址:
https://www.linkedin.com/uas/oauth2/authorization?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44