2012-02-16 31 views
1

我讀過關於這個問題的負載和負載,我仍然難倒。Facebook的HTML5像按鈕實現返回錯誤Like和與

我使用HTML5按鈕和Javascript SDK進行測試。一切都按預期工作,除了類似按鈕和類似按鈕之類的按鈕正在產生錯誤。錯誤如下:

「fb:app_id」元標記 中指定的應用ID「104975899017」無效。

我已經在SDK初始化代碼和Facebook元標記中設置了正確的應用程序ID(是的,我知道一個應用程序是什麼)。

,人們似乎認爲,一對夫婦的應用程序設置幫助他們解決問題:

應用程序域:store.youngdisciple.com,youngdisciple.com, blog.youngdisciple.com網站:http://youngdisciple.com/

這裏是JavaScript的testing page我:

window.fbAsyncInit = function() { 
    FB.init({ 
     appId  : '130960927011182', // App ID 
     channelUrl : '//www.youngdisciple.com/library/FacebookChannel.aspx', // Channel File 
     status  : true, // check login status 
     cookie  : true, // enable cookies to allow the server to access the session 
     xfbml  : true // parse XFBML 
    }); 

    // CUSTOM LISTENING CODE 

    FB.Event.subscribe('edge.create', 
     function(response) { 
      alert('You liked the URL: ' + response); 
     } 
    ); 
    FB.Event.subscribe('message.send', 
     function(response) { 
      alert('You sent the URL: ' + response); 
     } 
    ); 
}; 

// 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)); 

一第二元:

<meta property="og:title" content="Test"/> 
<meta property="og:type" content="website"/> 
<meta property="og:image" content="http://s3.pirillo.com/wp-content/uploads/2010/05/MonitorLight.jpg"/> 
<meta property="og:url" content="http://youngdisciple.com/facebook/fb-share-detect.html"/> 
<meta property="og:site_name" content="Young Disciple Ministries"/> 
<meta property="og:description" content="We are testing..."/> 
<meta property="fb:app_id" content="130960927011182"/> 

而按鈕本身:

<div class="fb-like" data-href="http://www.youngdisciple.com" data-send="true" data-width="450" data-show-faces="true"></div> 

回答