Sign in with Linkedin doesn't trigger callback

2019-02-21 16:20发布

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).

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

The line looks like this: IN.User.authorize(this._getProfileData, this);

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

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

Any clues?

1条回答
何必那么认真
2楼-- · 2019-02-21 16:59

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.

查看更多
登录 后发表回答