我想在「forumeiros」上的所有帖子上做一個Like按鈕(免費論壇)
當我在帖子上按下「Like」按鈕時,它像所有隨機發帖一樣,任何意義,我
使用下面的代碼來生成按鈕:
Facebook喜歡的按鈕太多了
jQuery(document).ready(function() {
var url = new Array();
var link = '';
jQuery('.postbody .topic-title a[name]').each(function(index){
link = "http://"+document.domain+jQuery(this).attr("href")+"/";
link = link.replace('#', '/t');
url.push(link);
});
jQuery('p.author').each(function(index){
jQuery(this).after('<iframe src="http://www.facebook.com/plugins/like.php?href='+url[index]+'&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=55" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:24px;" allowTransparency="true"></iframe><hr> ');
});
});
這裏有兩個生成的鏈接:
http%3A%2F%2Fgmbrdebug-t.forumeiros.com%2Ft2-teste-teste%2Ft2%2F
http%3A%2F%2Fgmbrdebug-t.forumeiros.com%2Ft2-teste-teste%2Ft3%2F
解碼:(只顯示href屬性設置爲Facebook的IFRAME)
http://gmbrdebug-t.forumeiros.com/t2-teste-teste/t2/
http://gmbrdebug-t.forumeiros.com/t2-teste-teste/t3/
那麼,爲什麼當我按下第一個 「喜歡」 的所有下面是 「喜歡」 嗎?他們是不同的。
編輯: 所有的url重定向到相同的地方,可能是?
如果是,Theres沒辦法做到這一點?