c# - Like button javascript loading -
i have website quotes(platon,aristotel etc..).all of quotes displayed on 1 site, pulled database.i have method automaticly creates button each of these quotes when web site gets loaded:
system.web.ui.htmlcontrols.htmlcontainercontrol fbiframe = new system.web.ui.htmlcontrols.htmlgenericcontrol("iframe"); fbiframe.attributes["scrolling"] = "no"; fbiframe.attributes["frameborder"] = "0"; fbiframe.attributes["style"] = "border:none; overflow:hidden; width:250px; height:21px;"; fbiframe.attributes["allowtransparency"] = "true"; fbiframe.attributes["src"] = "//www.facebook.com/plugins/like.php?href=" + httputility.urlencode("http://www.example.com/like/" + quote[0]) + "&send=false&layout=button_count&width=250&show_faces=false&action=like&colorscheme=light&font&height=21";
how work: when likes url example http://www.example.com/like/4 facebook externalhit crawles link , page(like.aspx routed like/{id}) creates title , meta decription dinamicly, pulls quote db , set meta description.. if it's not external hit user gets redirected correct quote on main page of them displayed.
the problem have 30-40 of on page , site loads slow. there script allow me kind of freedom able change href of url load buttons asynchronously after page loaded? please go detail as can, because never did of fb programming.
thanks
Comments
Post a Comment