2011-10-07 95 views
0

我與調試檢查,我只有一個警告:Facebook的Like按鈕不起作用

The og:locale property should be explicitly provided, even if a value can be inferred from other tags. 

順便說一句,我無法找到有關財產任何東西,也沒有它的要求不喜歡按鈕文檔說。

我有6個必需的標籤,一切看起來都很好。我正在使用Like按鈕的iframe版本。

類似按鈕顯示,可點擊,然後它簡要顯示1計數並消失。它從那裏沒有做任何事情。從服務器的響應是:

for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":true,"error_info":{"brief":"An error has occurred.","full":"There was an error liking the page. If you are the page owner, please try running your page through the linter on the Facebook devsite (https:\/\/developers.facebook.com\/tools\/lint\/) and fixing any errors.","errorUri":...

+0

你是否按照它的建議通過linter運行你的頁面? –

+0

是的,它只是發佈了一條警告。 – Tatsh

回答

0

嘗試把en_US作爲地區元值。我想知道如果Facebook正在很難確定您的網頁是什麼語言。

+0

這當然會擺脫警告,但Like按鈕仍然行爲相同。 – Tatsh

+0

什麼是網址? – bkaid

+0

http://beta.poluza.com/ – Tatsh

0

我切換到HTML 5 Like按鈕,但是我在添加腳本文件之前使用jQuery動態添加它。

var $likeButton = $('<div id="like-button" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="lucida grande"/>').addClass('fb-like').attr('data-href', window.location.protocol + '//' + window.location.hostname + '/'); 
$likeButton.insertBefore('.top-toolbar > .toolbar-links'); 

var js, id = 'facebook-jssdk'; 
if (document.getElementById(id)) { 
    return; 
} 
js = document.createElement('script'); 
js.id = id; 
js.async = true; 
js.src = '//connect.facebook.net/en_US/all.js'; 
document.getElementsByTagName('head')[0].appendChild(js);