按"讚"跑出"確認" - 部落格

Table of Contents

原文恕刪~

我自己本來也有這種煩惱,不過今天卻找到了解決方法。

我的blog是正常了,不知大家是否都適用,但可以試試看啦~~

目前推測是因為blogger會把網址轉成 .tw ,而按讚的網址卻是 .com

造成facebook認為這兩個網站不同,要求確認。

因此,解決方式就是加一段 javascript,使之將網址轉換成 .com

請到範本->修改html

在<head>下方加上以下的程式碼

<script type='text/javascript'>
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr(blog.lastIndexOf(&quot;.&quot;));
if (ctld != &quot;.com&quot;) {
var ncr = &quot;http://&quot; + blog.substr(0, blog.indexOf(&quot;.&quot;));
ncr += &quot;.blogspot.com/ncr&quot; + slug;
window.location.replace(ncr);
}
</script>


接下來儲存,再點看看讚,是不是沒有再出現確認了????

如果因為這樣有解決的話,就幫我到粉絲專頁點個讚衝人氣吧XD

謝謝大家。


--
我的部落格:http://kuangtc.blogspot.com
粉絲專頁:http://www.facebook.com/kuangtcsblog
歡迎參觀指教!!

--

All Comments

Ingrid avatarIngrid2012-09-02
你救了我><a
Lucy avatarLucy2012-09-03
你也救了我! 幫你按讚了XD
Jacky avatarJacky2012-09-06
哈哈~不客氣,因為我也救了我自己XD
Tristan Cohan avatarTristan Cohan2012-09-06
先感謝原po的分享,不過這樣後台統計會異常增多 xd
Hamiltion avatarHamiltion2012-09-11
謝謝你! 得救了耶 快加你的粉絲
Liam avatarLiam2012-09-11
謝謝樓上XD,另外,回樓樓上的話,統計增多目前無解. .
Catherine avatarCatherine2012-09-16
推推推!大讚!真的解決了
Wallis avatarWallis2012-09-20
我還是無法解決 怎麼會這樣
Dorothy avatarDorothy2012-09-20
解決!自動弄成com就解決了^^