我遇到了facebook開放圖表(廚師動作和食譜對象)的問題。我的網址 http://www.webcoachbd.com/tester.html 當我點擊「烹飪」時,它顯示一條警告「發生錯誤[對象目的]」。我已經看到了相關的主題並嘗試了這些,但問題沒有解決。 這是我tester.htmlfacebook打開圖譜食譜動作不起作用
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# rejoanxxxx: http://ogp.me/ns/fb/rejoanxxxx#">
<meta property="fb:app_id" content="12xxx" />
<meta property="og:type" content="rejoanxxxx:recipe" />
<meta property="og:url" content="http://www.webcoachbd.com/tester.html" />
<meta property="og:title" content="Sample Recipe" />
<meta property="og:image" content="http://www.webcoachbd.com/images/animl136.jpg" />
<script type="text/javascript">
function postCook()
{
FB.api( '/me/rejoanxxxx:cook?recipe:http://www.webcoachbd.com/tester.html',
'post',
function(response) {
if (!response) {
alert('Error occurred : No Response');
} else if (response.error) {
alert('Error occurred : ' + response.error);
} else {
alert('Cook was successful! Action ID: ' + response.id);
}
});
}
</script>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '[123xxxxxxxx]', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<h3>Stuffed Cookies</h3>
<p>
<img title="Stuffed Cookies"
src="http://www.webcoachbd.com/images/animl136.jpg"
width="550"/>
</p>
<br>
<form>
<input type="button" value="Cook" onclick="postCook()" />
</form>
和應用基本設置是 應用程序域:webcoachbd.com 網站的URL:http://webcoachbd.com
我檢查我的網址(http://www.webcoachbd.com/tester.html)與facebook調試器,不要顯示任何錯誤或警告。 有沒有解決這個問題的方法?請幫忙。
謝謝問題解決了。 –