0
私はLinkedIn APIに関するいくつかの助けが必要です。次のエラーが表示されます。有効なJavaScript APIドメインを指定する必要があります
キャッチされていないエラー:このキーの設定の一部として有効なJavaScript APIドメインを指定する必要があります。
しかし、私はすでに私のドメインをJavascript SDKドメインに追加しています。私のドメインは、次のいずれかです。
http://is01.inthegra-app.com.ar:8083/apex/
LinkedInのは、有効なものとしてそれを取るが、私はまだ同じエラーを持ちます。私のページのコードは、このいずれかになります。
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: API_KEY_HERE;
onLoad: onLinkedInLoad;
authorize: true;
</script>
<script type="text/javascript">
function mandoMensaje(){
onLinkedInLoad();
}
function onLinkedInLoad() {
IN.Event.on(IN, "auth", shareContent);
}
function onSuccess(data) {
console.log(data);
}
function onError(error) {
console.log(error);
}
function shareContent() {
var payload = {
"Content-Type": "application/json",
"x-li-format": "json",
"comment": "Hello world...",
"content": {
"title": "LinkedIn API Test",
"description": "Publish in LinkedIn from HTML and JavaScript",
"submitted-url": "http://www.inthegra.com.ar",
"submitted-image-url": "http://www.inthegra.com.ar/img/logo-inthegra-blanco.png"
},
"visibility": {
"code": "anyone"
}
};
IN.API.Raw("/people/~/shares?format=json")
.method("POST")
.body(JSON.stringify(payload))
.result(onSuccess)
.error(onError);
}
</script>