LinkedIn Member Profile Plugin error
Asked Answered
M

1

6

I'm trying out LinkedIn's Member Profile Plugin Generator: https://developer.linkedin.com/plugins/member-profile

It generated some script tags for inclusion on an HTML page:

<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/MemberProfile" data-id="<Profile URL>" data-format="inline" data-related="false"></script>

When I inserted the code on my page, it generated an error in the console:

secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:463 Uncaught TypeError: Cannot read property '2' of null
getLocation @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:463
prepareTransportStack   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:556
easyXDM.Rpc @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:637
place   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3092
E   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:2097
E   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:2090
B   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:320
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1774
E   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1779
E   @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
window.IN.parse @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1788
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3269
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3270
(anonymous function)    @   secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3290

The answers here did not help.

Meagre answered 22/4, 2015 at 19:5 Comment(1)
Which browser did you work on? Seems it's working correctly in modern browsers.Peltast
R
0

I had the same issue on localhost: There is a regex in the secureAnonymous javascript file, which tries to detect from which page you are currently. (https://platform.linkedin.com/js/secureAnonymousFramework) It failed when the protocol starts with 'file://'. On remote host, it will work correctly.

Ramer answered 12/6, 2018 at 9:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.