为什么链接给我一个安全代码而不是使用令牌重定向回我的应用程序?
我正在使用此处找到的 LinkedIn PHP Oauth 示例:
https://github.com/petewarden/linkedinoauthexample
我发现与其他选项相比,它更容易理解和使用,因此我想坚持使用它。作者有一个基于我正在使用的相同代码的示例,它完全按照我希望我的应用程序工作的方式工作。唯一的问题是,它没有在授权后重定向回我的应用程序,而是给了我一个安全代码......
您已成功授权我的应用程序
请返回您的应用程序并输入以下安全代码以授予访问权限:
我仅稍微修改了作者的示例以用作 CodeIgniter 库。 这里是修改后的示例代码。 这里是我在 CodeIgniter 中调用它的方式。
为什么它不使用令牌重定向到我的应用程序?
I am using the LinkedIn PHP Oauth example found here:
https://github.com/petewarden/linkedinoauthexample
I've found it much easier to understand and use compared to other options so I'd like to stick with it. The author has an example based on the same code that I am using, which works exactly how I want my application to work. The only problem is that instead of redirecting back to my application after authorization, it gives me a security code...
You have successfully authorized My Application
Please return to your application and enter the following security code to grant access:
I've only slightly modified the author's example to be used as a CodeIgniter library. Here is the modified example code. And here is how I am calling it within CodeIgniter.
Why is it not redirecting to my application with the token instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,这意味着您没有正确设置回调 URL。 (或者根本不设置回调,因此它默认为 OOB 设置。)
我需要花时间阅读所有代码并找出确切的问题,但似乎确实有很多 error_log()ging。所以,我会检查一下设置的位置。我还会尝试查看原始 HTTP 消息...这将帮助我识别缺少的内容,然后我们可以查看代码中的该位置。
Normally, that means you're not setting the callback URL properly. (Or not setting a callback at all, so it's defaulting to the OOB setting.)
It would take me time to read all that code and figure out the exact issue, but there does appear to be lots of error_log()ging. So, I would check to see what's setting set where. I would also try and look at the raw HTTP messages... that would help me identify what's missing where, and then we could look at that spot in the code.