好的,我正在尝试使用LinkedIn的api,当我构建一个示例调用时,示例如下
<a href="https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https://www.example.com/auth/linkedin&state=987654321">Login</a>它在cakephp 3的前端显示如下,第一个https被去掉了
<a href="/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https://www.example.com/auth/linkedin&state=wGg4ksv8WHpx26dV">Login in</a>只要我从redirct_uir参数或整个redirct_uri参数中删除https,它当前就会显示出来。任何人都知道如何解决这个问题或一个好的解决办法。我需要在两个urls中有一个https,以便api正常工作。
发布于 2017-12-08 06:13:21
您在查询参数中使用了无效字符。我将猜测浏览器正在剥离https,因为在?查询标识符后有://字符。
您必须调用urlencode("https://www.example.com/auth/linkedin")并将结果用作查询参数。
https://stackoverflow.com/questions/47682997
复制相似问题