0

当我尝试使用 Linkedin Javascript API 验证用户并根据用户登录状态触发 ajax 函数时,出现此错误。

XMLHttpRequest cannot load https://www.linkedin.com/uas/oauth/authenticate?oauth_token=75--7530050c-c992-4791-95f0-5c43386a147d. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.x.xx' is therefore not allowed access.

测试用例:

当我点击下面的按钮时,函数调用被触发

IN.User.authorize(function(){ call my callback() here if logged-in });

LinkedIn弹出窗口来了,我可以登录,但之后我就遇到了错误。我正在我的本地机器上尝试相同的操作,因此该网站有我的 IP 地址。

任何帮助都将受到高度赞赏,因为我想通过 LinkedIn Javascript API 对用户进行身份验证,并且成功后我想执行一个 ajax,我想通过它向用户发送消息。

4

0 回答 0