我想在网站上显示来自我自己帐户的 LinkedIn 推荐。
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: xxxx
onLoad: onLinkedInLoad
authorize: false
</script>
<script type="text/javascript">
function onLinkedInLoad(){
var target = $("#recommendation");
IN.API.Raw("people/~:(id,first-name,last-name,recommendations-received)").method("GET").result(function(result){
console.log("result",result);
for(var key in result.values) {
var recommendation = result.values[key];
target.append($(recommendation.recommender.firstName + recommendation.recommender.lastName + recommendation.recommendationText));
}
});
}
</script>
但是,当我加载页面时,我得到:
Blocked a frame with origin "https://api.linkedin.com" from accessing a frame with origin "http://127.0.0.1". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
GET https://api.linkedin.com/v1/people/~:(id,first-name,last-name,recommendations-received) 404 (Not Found)
XHR finished loading: "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,recommendations-received))".
有谁知道我要去哪里错了?我与授权设置真或假相同,理想情况下我不想要求登录,只需从我自己的个人资料中显示。