How do I add facebook and google plus share code to HTML5Boilerplate?
HTML5Boilerplate has some conditional code for outputting the open < HTML > tag. I'm working on adding the xfb开发者_开发问答ml and google plus sharing code on my site, but not sure where to add the required code to the < HTML > tag.
On Paul Irish's github I see this comment thread which says facebook only needs the code in the open < html > tag for IE browsers: https://github.com/paulirish/html5-boilerplate/pull/395, so I could just add that to the conditional IE statements in html5boilerplate.
However I'm not sure about the google plus code. At this page http://www.google.com/webmasters/+1/button/index.html it tells us to add this to the < HTML > tag:
<!-- Update your html tag to include the itemscope and itemtype attributes -->
<html itemscope itemtype="http://schema.org/">
I could use some guidance on how to include the < html > tag by default so I can append information to it for the social sharing tools.
Thanks, Stacey
Don’t use XFBML. Use this instead: http://www.phpied.com/social-button-bffs/
精彩评论