使用JS API时,使用Linkedin登录不会触发iOS Safari上的回调 [英] Sign in with Linkedin doesn't trigger callback on iOS Safari when using the JS API

查看:62
本文介绍了使用JS API时,使用Linkedin登录不会触发iOS Safari上的回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过JS API在网站上使用Linkedin和LinkedIn.在我测试过的几种台式机浏览器(Windows上的Chrome和FF,MacOS上的Safari)以及稍有过时的Android Chrome上,它都能正常工作.但是在iOS Safari(我使用iOS 7)上失败.

I'm using SignIn with Linkedin on a website, via the JS API. It works fine on the few desktop browsers I've tested (Chrome and FF on Windows, Safari on MacOS), and on a slightly outdated Android Chrome. But it fails on iOS Safari (I use iOS 7).

问题在于,在iOS Safari上,未执行作为参数传递给IN.User.authorize的回调.

The issue is that on iOS Safari, the callback passed as argument to IN.User.authorize is not executed.

该行如下所示:IN.User.authorize(this._getProfileData, this);

_getProfileData在上述桌面浏览器和Android Chrome上执行,但在iOS Safari上不执行.

_getProfileData is executed on the desktop browsers mentioned above and Android Chrome, but not iOS Safari.

这个问题甚至可以在没有iOS的情况下重现:通过Chrome的开发者工具,在iPhone和iPad的设备模式下.

This issue can even be reproduced without iOS: via Chrome's developer tools, in device mode for iPhones and iPads.

有任何线索吗?

推荐答案

不幸的是,LinkedIn的JS SDK与Java 5+不兼容,原因是跨窗口通信过程中暂停Javascript的方式.您需要回退到服务器端REST调用,以确保100%的平台兼容性.

Unfortunately, LinkedIn's JS SDK is incompatible with iOS 5+ due to the way that Javascript is paused during cross-window communication processes. You will need to fall back to server-side REST calls to ensure 100% platform compatibility.

这篇关于使用JS API时,使用Linkedin登录不会触发iOS Safari上的回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆