8

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?

Blackbird
  • 2,368
  • 4
  • 26
  • 41

2 Answers2

4

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.

Justin Kominar
  • 3,346
  • 1
  • 14
  • 14
  • 4
    +1 - This is a HUGE caveat and should be clearly indicated in the LinkedIn JS SDK documentation so people don't waste days of their time implementing this as a solution (like I just did) just to find out that it doesn't work on iOS. The documentation merely says that the SDK supports Safari 5+. Terrible support / documentation, LinkedIn. :-/ – Javid Jamae Jul 30 '17 at 09:11
0

Since the 1st of May 2019 this is no longer working : https://engineering.linkedin.com/blog/2018/12/developer-program-updates

Sign In with LinkedIn: Sign In with LinkedIn enables members to choose a more convenient way to log-in to third party apps and allows those apps to learn more about their new user. This API will only recognize a new “Lite Profile” permission, which supports a reduced set of member profile fields. See the documentation for more details.

and

SDKs: Our JavaScript and Mobile Software Development Kits (SDKs) will stop working. Developers will need to migrate to using OAuth 2.0 directly from their apps.

KevinS
  • 8,087
  • 2
  • 17
  • 9