tag:blogger.com,1999:blog-865923359735383241.post2566830413644010318..comments2023-10-29T07:27:09.012-06:00Comments on Ccna final exam - java, php, javascript, ios, cshap all in one: New Facebook like button HTML validationUnknownnoreply@blogger.comBlogger16125tag:blogger.com,1999:blog-865923359735383241.post-8413627892425882802012-05-30T03:42:28.841-06:002012-05-30T03:42:28.841-06:00You can find a solution to your problem here: http...You can find a solution to your problem here: http://www.londoncitygallery.co.uk/valid-fb-button.htmlUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-44451469600581080542012-05-30T03:42:27.955-06:002012-05-30T03:42:27.955-06:00I just wrote an article describing all the changes...I just wrote an article describing all the changes I had to do get 100% W3C Compliant with Facebook Social Plugins. Hope it helps and you can find it here:<br /><br />http://intensewebsites.blogspot.com/2010/11/fix-for-w3c-valid-xhtmlrdfadoctype-for.htmlUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-52596480348674537202012-05-30T03:42:27.296-06:002012-05-30T03:42:27.296-06:00Always comment it out.
for the fb:like
<scri...Always comment it out.<br /><br />for the fb:like <br /><br /><script language="javascript" type="text/javascript"><br />//<![CDATA[<br />document.write('<fb:like href="http://www.c-p-p.net" layout="button_count" show_faces="false" width="90" action="like" font="arial" colorscheme="light"></fb:like>');<br />//]]><br /></script><br /><br /><br />also the Meta Data in the header<br /><br /><!--<br /><meta property="og:title" content=" some title" /><br /><meta property="og:type" content="website" /><br /><meta property="og:url" content="http://c-p-p.net/" /><br /><meta property="og:image" content="site image" /><br /><meta property="og:site_name" content="site name" /><br /><meta property="og:description" content="description text" /><br /><meta property="fb:admins" content="some number" /><br />--><br /><br /><br />repair the javascript tag add type="text/javascript"<br /><br /><script type="text/javascript">(function(d, s, id) {<br /> var js, fjs = d.getElementsByTagName(s)[0];<br /> if (d.getElementById(id)) return;<br /> js = d.createElement(s); js.id = id;<br /> js.src = "//connect.facebook.net/en_EN/all.js#xfbml=1";<br /> fjs.parentNode.insertBefore(js, fjs);<br />}(document, 'script', 'facebook-jssdk'));</script><br /><br /><br />and for the iframe version<br /><br /><script language="javascript" type="text/javascript"><br />//<![CDATA[<br />document.write('<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%..... allowTransparency="true"></iframe>');<br />//]]><br /></script><br /><br /><br />it works on my website http://c-p-p.netUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-77281940723427940552012-05-30T03:42:26.527-06:002012-05-30T03:42:26.527-06:00Here is a good solutions. If you're going to u...Here is a good solutions. If you're going to use document.write use it as shown below and it will validate perfectly<br /><br /><script type="text/javascript"><br />//<![CDATA[<br />(function() {<br /> document.write('<a href="https://twitter.com/share" data-count="vertical" data-via="siteripe">Tweet</a>');<br /> var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];<br /> s.type = 'text/javascript';<br /> s.async = true;<br /> s.src = 'http://platform.twitter.com/widgets.js';<br /> s1.parentNode.insertBefore(s, s1);<br />})();<br />//]]><br /></script>Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-63824648305845422522012-05-30T03:42:25.299-06:002012-05-30T03:42:25.299-06:00I have a solution. Just to wrap tags in JS and do...I have a solution. Just to wrap tags in JS and document.write it.<br /><br />http://nerdramblings.tumblr.com/post/3213578636/html5-and-facebooks-fbml<br /><br />J.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-12274576791404756032012-05-30T03:42:24.318-06:002012-05-30T03:42:24.318-06:00Ok, after going over literally hundreds of these p...Ok, after going over literally hundreds of these posts, I finally found a quick and easy way to get a valid page with a Like button (or any other facebook widget) on it.<br /><br />Just a fewlines of code really, take a look at http://www.liormark.com/develop/development-articles/facebook-fbml-w3c-validation-solvedUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-62643688736931865632012-05-30T03:42:23.686-06:002012-05-30T03:42:23.686-06:00I've recently used:
<script type="tex...I've recently used:<br /><br /><script type="text/javascript"><br />document.write('<fb:like href="http://www.mywebsite.co.uk" layout="button_count" show_faces="true" width="100"></fb:like>');<br /></script> <br /><br /><br />and it seems to work fine, even if it is a bit smelly.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-59217163146112456052012-05-30T03:42:22.622-06:002012-05-30T03:42:22.622-06:00@Eric I hope you eventually found what you were lo...@Eric I hope you eventually found what you were looking for.<br /><br />Twitter integration has its difficulties if you want to empower developers to validate irrespective of XHTML Strict 1.0 or HTML5. Facebook, on the other hand, is down right impossible with its custom FBML tags.<br /><br />On our last project my friend Jason and I knew two things for certain:<br /><br /><br />We were going to validate XHTML Strict 1.0 using Facebook's Like Button<br />We were not going to add Technical Debt by fudging our DOCTYPE or xmlns<br /><br /><br />The solution is to use a flexible, asynchronous JavaScript module. Thankfully, we had some help and guidance along the way: http://techoctave.com/c7/posts/40-xhtml-strict-tweet-button-and-facebook-like-buttonUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-76287195375599995992012-05-30T03:42:21.725-06:002012-05-30T03:42:21.725-06:00you can embed html tags into script via document.w...you can embed html tags into script via document.write..<br />http://www.tymsh.com/2010/06/25/sitenize-facebook-like-begen-butonu-ekleyin/ here how to do this with an example.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-55495614981555800332012-05-30T03:42:20.044-06:002012-05-30T03:42:20.044-06:00RE: Welcho
Found the script type was causing an ...RE: Welcho <br /><br />Found the script type was causing an error for me (XHTML 1.0 Transitional). Also added for those who may be missing that. <br /><br />Your's is the best and easiest to use I have seen online to date. After looking over it again - ha! you're the best :) <br /><br />Cheers and thnks :)<br /><br /><div id="fb-root"></div> <br /><br /><div id="FbCont"><br /><script type="text/javascript" <br />src="http://connect.facebook.net/en_US/all.js#appId=XYOURIDXyourapID=1"><br /></script><br /><script type="text/javascript"><br /><!--//--><![CDATA[//><br /><!--<br />var fb = document.createElement('fb:like'); <br />fb.setAttribute("href","http://www.wakawakblahblah.com"); <br />// fb.setAttribute("layout","button_count");<br />fb.setAttribute("send","true");<br />fb.setAttribute("action","recommended");<br />fb.setAttribute("show_faces","false");<br />fb.setAttribute("width","280");<br />fb.setAttribute("font","trebuchet ms");<br />document.getElementById("FbCont").appendChild(fb);<br />//--><!]]><br /></script><br /></div>Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-33717553028981169452012-05-30T03:42:18.126-06:002012-05-30T03:42:18.126-06:00For dose who are using "<javascript... doc...For dose who are using "<javascript... document.write..." document.write is not a valid DOM procedure so in Fire Fox and Chrome if you use it in an XML/XHTML Strict with content-type as text/xml don't work.<br /><br />A valid DOM aproach that works for me:<br /><br /><div id="FbCont"><br /> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1" type="text/javascript"></script><br /><br /> <script type="text/javascript"><br /><!--//--><![CDATA[//><!--<br />var fb = document.createElement('fb:like'); <br />fb.setAttribute("href","http://www.cirugia-obesidad.mx"); <br />fb.setAttribute("layout","button_count");<br />fb.setAttribute("show_faces","true");<br />fb.setAttribute("width","100");<br />fb.setAttribute("font","arial");<br />document.getElementById("FbCont").appendChild(fb);<br />//--><!]]><br /></script><br /><br /> </div><br /><br /><br />Hope this work for others.<br /><br />WelchUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-58978665336633621152012-05-30T03:42:14.114-06:002012-05-30T03:42:14.114-06:00have you tried to add xmlns:fb="http://www.fa...have you tried to add xmlns:fb="http://www.facebook.com/2008/fbml"?Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-40098231659250901152012-05-30T03:42:12.908-06:002012-05-30T03:42:12.908-06:00Just a follow-up in case anyone uses the comment m...Just a follow-up in case anyone uses the comment method. Facebook currently honors comments, so wrapping meta property tags in comments will cause Facebook to ignore them. If you check your pages with the Facebook URL Linter you can see they don't use commented-out meta tags.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-3898915473116888152012-05-30T03:42:12.170-06:002012-05-30T03:42:12.170-06:00FBML will not validate, as it's not valid XHTM...FBML will not validate, as it's not valid XHTML. The W3C validator doesn't know what to do with it. The errors can be safely ignored.<br /><br />If you must must must have validation, you could use a <script> tag to output the FBML instead of directly including it in the page's HTML.Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-4093482698022493262012-05-30T03:42:11.127-06:002012-05-30T03:42:11.127-06:00starting today you can also use HTML5-compliant ma...starting today you can also use HTML5-compliant markup<br /><br />e.g. instead of<br /><br /><fb:like href="example.org"><br /><br /><br />you can do<br /><br /><div class="fb-like" data-href="example.org"><br /><br /><br />Since data-* attributes are valid in HTML5Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-18462931682166034252012-05-30T03:42:10.052-06:002012-05-30T03:42:10.052-06:00Here is a solution for not swapping doctype:
As z...Here is a solution for not swapping doctype:<br /><br />As zerkms suggested, adding the "fb" namespace only applies for the "fb:" attributes. The "property" attribute of the meta tag remains invalid XHTML.<br /><br />As you know, Facebook builds upon the RDFa compliance, so you could use the following doctype:<br /><br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <br /><br /><br />Using RDFa brings more problems than the simple FB issue fix in most cases though.<br /><br />as _timm suggested, dynamically writing the meta tags to the dom doesn't make any sense. One of the major uses of these fb meta tags is the FB-bot parsing of a "share" or "i like" target page (action page) to provide custom titles, images and anchor label for the facebok wall post auto population. Given that fact and given the fact that facebook most certainly uses a simple page fetch to read in the delivered html response without any capability of parsing a related meta tag inject by javascript, the intended functionality will simply fail. <br /><br />Now, there is a pretty simple fix to provide a compromise between a XHTML validation and successful parsing by facebook : wrap the facebook meta in html comments. That bypasses the w3c parser and facebook still recognizes the meta tags, cause it ignores the comment.<br /><br /><!--<br /><meta property="og:image" content="myimage.jpg" /><br /><meta property="og:title" content="my custom title for facebook" /><br />-->Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.com