リンクされた例に従おうとしていますが、コードが機能していないようです
サンプル コードを HTML ページにコピーすると、次のようにレンダリングされます。
Profile App Example
'); IN.parse(document.getElementById("profile")) }) }
firebugでこのエラーが発生します
SyntaxError: unterminated string literal
[Break On This Error]
e="IN/FullMemberProfile" data-id="' + result.values[0].id + '">
しかし、私はそれを見ていません(サンプルコードでは、すべての引用符が一致しているように見えます)。
このエラーも発生します
TypeError: $.cookie is not a function
[Break On This Error]
...kie('quck-note-current', JSON.stringify({ "Id": id, "Note": note }), { expires: ...
編集
これが彼らが持っている完全なサンプルコードです。
<html>
<head>
<title>Profile App Example</title>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: o1yf9WMdgd8dp_OGkmtXESCOJFostN8N1jI1AFKY2i0kJ1QFNMOs3a6R5qUoBIqF
authorize: true
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5b1.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
<script type="text/javascript">
function loadData() {
IN.API.Profile("me")
.result(function(result) {
$("#profile").html('<script type="IN/FullMemberProfile" data-id="' + result.values[0].id + '"></script>');
IN.parse(document.getElementById("profile"))
})
}
</script>
</head>
<body class="yui3-skin-sam yui-skin-sam">
<div id="profile"></div>
<script type="IN/Login" data-onAuth="loadData"></script>
</body>
</html>
編集 2
私は彼らのAPIキーを使用してみましたが、私のAPIキーを使用しました(何らかの理由で彼らの例よりもかなり短いですが、APIキーの下のアプリ領域に表示されています)