我想在“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没办法做到这一点?