以下のように私のコーディング:
<!DOCTYPE>
<html>
<head>
<script src="https://connect.facebook.net/en_US/sdk.js"></script>
<meta property="fb:app_id" content="1665615247095212" />
<meta property="og:type" content="heppiheppi:shares" />
<meta property="og:url" content="http://mywebsite.com" />
<meta property="og:title" content="Walk-in" />
<meta property="og:image" content="http://mywebsite.com/images/intro.jpg" />
<meta property="og:description" content="Bring more customers" />
</head>
<body style='padding:0;margin:0;'>
<div id="fb-root"></div>
<script>
FB.init({
appId : '1665615247095212',
xfbml : true,
version : 'v2.7'
});
function LaunchDialog(){
FB.ui({
method: 'share_open_graph',
action_type: 'og.shares',
action_properties: JSON.stringify({
object:'http://mywebsite.com',
})
},
function(response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
});
}
</script>
<a href="#" onclick="LaunchDialog();">Share now</a>
</body>
</html>
デスクトップ ブラウザでテストする場合は、[今すぐ共有] をクリックし、共有ダイアログを表示して [キャンセル/X] をクリックすると、[投稿中にエラーが発生しました] と表示されます。モバイル ブラウザでテストする場合は、[今すぐ共有] をクリックして共有ダイアログを表示し、[キャンセル] または [X] をクリックすると、[投稿が完了しました] と表示されます。誰もこの問題について手がかりを持っていますか?