mobile-safarilinkedin-apilinkedin-jsapi

Sign in with Linkedin doesn't trigger callback on iOS Safari when using the JS API


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?


Solution

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