I tried out the simple example of displaying user profile info but getting the below in IE9 ( after logging into my linkedaccount and grant access to the application)
Line : 1020
Error :"Unable to get value of property 'apply': object is null or undefined "
In FireFox 11, it's not even displaying the linkedin button
<html>
<head>
<title>Network Sreaming App Example</title>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: key goes here
authorize: true
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link media="all" type="text/css" href="http://developer.linkedinlabs.com/tutorials/css/jqueryui.css" rel="stylesheet"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5b1.js" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" />
<script type="text/javascript">
function loadData() {
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "headline"])
.result(function (result) {
profile = result.values[0];
profHTML = "<p><a href=\"" + profile.publicProfileUrl + "\">";
profHTML += "<img class=img_border align=\"left\" src=\"" + profile.pictureUrl + "\"></a>";
profHTML += "<a href=\"" + profile.publicProfileUrl + "\">";
profHTML += "<h2 class=myname>" + profile.firstName + " " + profile.lastName + "</a> </h2>";
profHTML += "<span class=myheadline>" + profile.headline + "</span>";
$("#profile").html(profHTML);
});
}
</script>
</head>
<body class="yui3-skin-sam yui-skin-sam">
<div id="profile">
</div>
<script type="IN/Login" data-onAuth="loadData"></script>
</body>
</html>
- Log in to post comments
Try doing it without the []'s around the fields() parameters. Not sure if that's related, but could be one possibility (yes, I know how docs show it that way, and I will fix them if that's the issue).
-Jeremy